trueharted
Programmer
In Access I have a form with a list box that the user picks a client from and then presses a button to pull up the client form filtering the form for the client they chose. Okay, so here's my problem. It works great until I use an autonumber field as the bound field for the list box and filter. On a number field it works fine, but on an autonumber field I get error 2501 - action was canceled. Is there a syntax problem here? Here's my code:
Private Sub btnShowRecord_Click()
'Find the selected record, then close the dialog box.
'Find the selected record.
DoCmd.OpenForm "frmClients", , , "[ClientID]='" & List0 & "' "
'Close the dialog box.
DoCmd.Close acForm, "frmGoToRecordDialog"
End Sub
Private Sub btnShowRecord_Click()
'Find the selected record, then close the dialog box.
'Find the selected record.
DoCmd.OpenForm "frmClients", , , "[ClientID]='" & List0 & "' "
'Close the dialog box.
DoCmd.Close acForm, "frmGoToRecordDialog"
End Sub