A
Antonio
I have been using combo boxes to locate data on the
current form that is displayed. On one form I use it to
locate a record belonging to a specific person...which is
by the persons last name. To create them I use the wizard
(know little about VBA)and it works fine. Here is an
example of the code the wizard sets up for me.
Private Sub Combo36_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[DDName] = " & Str(Nz(Me![Combo36], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
I would like a message box to pop up stating "that name
does not exist" or "that person has not been entered
yet". Right now, if you enter a name that is not in the
table, the form seems to just sit there and do nothing.
Is there a way to add a line of code to the end of the
code above to produce a message box?
TIA
current form that is displayed. On one form I use it to
locate a record belonging to a specific person...which is
by the persons last name. To create them I use the wizard
(know little about VBA)and it works fine. Here is an
example of the code the wizard sets up for me.
Private Sub Combo36_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[DDName] = " & Str(Nz(Me![Combo36], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
I would like a message box to pop up stating "that name
does not exist" or "that person has not been entered
yet". Right now, if you enter a name that is not in the
table, the form seems to just sit there and do nothing.
Is there a way to add a line of code to the end of the
code above to produce a message box?
TIA