Hi all,
Could anyone give me a hand here. I have a form that has an unbound textbox to enter search criteria for a table. I'm using the code below to search the table and open an another form to view the details and it brings up a blank record if the criteria isn't found.
Is it possible to bring up a yes\no dialog box asking the user do they want to enter details on the criteria that wasn't found??
Function FindMacro() As Boolean
On Error GoTo FindMacro_Err
With CodeContextObject
DoCmd.GoToControl "Ticket Number"
DoCmd.OpenForm "Test", acNormal, "", "", , acNormal
DoCmd.FindRecord .[Ticket Number], acEntire, False, , True, acCurrent, True
End With
FindMacro_Exit:
Exit Function
FindMacro_Err:
MsgBox Error$
Resume FindMacro_Exit
End Function
Any help on this would be much appreciated.
Could anyone give me a hand here. I have a form that has an unbound textbox to enter search criteria for a table. I'm using the code below to search the table and open an another form to view the details and it brings up a blank record if the criteria isn't found.
Is it possible to bring up a yes\no dialog box asking the user do they want to enter details on the criteria that wasn't found??
Function FindMacro() As Boolean
On Error GoTo FindMacro_Err
With CodeContextObject
DoCmd.GoToControl "Ticket Number"
DoCmd.OpenForm "Test", acNormal, "", "", , acNormal
DoCmd.FindRecord .[Ticket Number], acEntire, False, , True, acCurrent, True
End With
FindMacro_Exit:
Exit Function
FindMacro_Err:
MsgBox Error$
Resume FindMacro_Exit
End Function
Any help on this would be much appreciated.