Using Access 2007
Windows 7
Using this code to find duplicate client ID and have message popup.
Keep getting error on If clientidTemp line saying cannot find the client info form...
That's the name of the form. Is it because of space in title or the form does have 3 tabbed pages on it.
Do I need to look for the page on the form?
Please help...
Private Sub IDClient_AfterUpdate()
Dim clientidTemp As Variant
clientidTemp = DLookup("[ClientID]", "Client Table", "[ClientID]= Forms![Client Info]![IDClient]")
[highlight #FCE94F]If clientidTemp = Forms!Client Info!IDClient Then[/highlight]
Me!IDClient.SetFocus
Me.Undo
MsgBox "DUPLICATE CLIENT ID. Please re-enter.", vbOKOnly, "Duplicate CLIENT ID"
End If
End Sub
TIA..
Jennifer
Jedder
Windows 7
Using this code to find duplicate client ID and have message popup.
Keep getting error on If clientidTemp line saying cannot find the client info form...
That's the name of the form. Is it because of space in title or the form does have 3 tabbed pages on it.
Do I need to look for the page on the form?
Please help...
Private Sub IDClient_AfterUpdate()
Dim clientidTemp As Variant
clientidTemp = DLookup("[ClientID]", "Client Table", "[ClientID]= Forms![Client Info]![IDClient]")
[highlight #FCE94F]If clientidTemp = Forms!Client Info!IDClient Then[/highlight]
Me!IDClient.SetFocus
Me.Undo
MsgBox "DUPLICATE CLIENT ID. Please re-enter.", vbOKOnly, "Duplicate CLIENT ID"
End If
End Sub
TIA..
Jennifer
Jedder