7,714
社区成员
发帖
与我相关
我的任务
分享
Private Function ExcSubSelect() As Boolean
ExcSubSelect = True
strSql = "select * from familyInfo where Id= '" & IdSelected & "'"
me.subfamilyInfo.Form.RecordSource=strSql
me.subfamilyInfo.Form.Requery
If me.subfamilyInfo.Form.Recordset.EOF Then
DoCmd.Beep
MsgBox ("没有这个用户的信息!")
ExcSubSelect = False
Exit Function
Else
With Me.subfamilyInfo.Form '设置值
.ID.ControlSource = "Id"
.famName.ControlSource = "Name"
.Age.ControlSource = "Age"
.Relationship.ControlSource = "Relationship"
.Occupation.ControlSource = "Occupation"
.NameOfCompany.ControlSource = "NameOfCompany"
.Telephone.ControlSource = "Telephone"
End With
End Function