简单点算了,想在一个表里实现,house用一个datacontrol,peron用一个datacontrol.我浏览到哪个房子的信息时,我还可以点击浏览这个房子相对应housereference相同的人物,下面我自己写了一点代码,如果housereference不同则隐藏,如果相同person的信息就显示,并可以浏览这个房子里其他人物,怎么一运行就出错啊,"data type mismatch in criteria expression"多谢!!辛苦!!!!Private Sub Text1_Change()
Picture1.Visible = False
Data2.Recordset.MoveFirst
If Text6.Text <> "" Then
Data2.Recordset.FindFirst " HouseReference = '" + Text1.Text + "'"
Picture1.Visible = True
End If
End Sub数据库给出来的2个表中的部分的数据:
这是第一个表person
FirstName FamilyNameHouseReference
Filch 5
Madam Hooch 5
Drako Malfoy 3
Herc Granger 1
Ron Weasley 1
第2个表是house
Name Location Reference
Hogwarts West Wing 1
Hufflepuff Hogwarts East Tower 2
SlytherinInner Courtyard basement 3
Ravenclaw South Tower 4
Unallocated 5
Picture1.Visible = False
Data2.Recordset.MoveFirst
If Text6.Text <> "" Then
Data2.Recordset.FindFirst " HouseReference = '" + Text1.Text + "'"
Picture1.Visible = True
End If
End Sub数据库给出来的2个表中的部分的数据:
这是第一个表person
FirstName FamilyNameHouseReference
Filch 5
Madam Hooch 5
Drako Malfoy 3
Herc Granger 1
Ron Weasley 1
第2个表是house
Name Location Reference
Hogwarts West Wing 1
Hufflepuff Hogwarts East Tower 2
SlytherinInner Courtyard basement 3
Ravenclaw South Tower 4
Unallocated 5
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货