B
bbcombo
I am trying to use this code to count records and if the record is
found,"Your Data was entered". If no record is found I am trying to give
"Your Part Number was not found" and not enter the data. Here is my current
code, what corrections do I need to make? thanks in advance.
Private Sub PartNum_AfterUpdate()
Dim PartNum As String
Me.PartNum = PartNumber
x = DCount("[FootSwitch1]", "[Part Number Master]")
If x = 0 Then
MsgBox ("Your Data Was Entered")
Else: MsgBox ("Your Part Number Was Not Found")
End If
End Sub
found,"Your Data was entered". If no record is found I am trying to give
"Your Part Number was not found" and not enter the data. Here is my current
code, what corrections do I need to make? thanks in advance.
Private Sub PartNum_AfterUpdate()
Dim PartNum As String
Me.PartNum = PartNumber
x = DCount("[FootSwitch1]", "[Part Number Master]")
If x = 0 Then
MsgBox ("Your Data Was Entered")
Else: MsgBox ("Your Part Number Was Not Found")
End If
End Sub