Hi all,
I had to make some changes to my form I have this code (below) on and changed the PersonID to a CboPerson and not sure how to change the code that goes with it.
I believe the AT = PersonID needs to be changed to CboPerson but cannot figure out what syntax goes with it?
Thank you all
Code:
Private Sub CmdClose_Click()
Dim pCount As Integer
Dim TF As Boolean
Dim AT As String
AT = [PersonID]
'Count number of Preferred=True for this PersonID
pCount = DCount("PersonID", "Person2AddressTbl", "PersonID=" & AT & " AND Preferred =" & True)
If pCount = 0 Then
TF = True
Else
TF = False
End If
DoCmd.Close
Forms!PersonFrm.Refresh
End Sub