Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Works except on autonumber field - puzzled

Status
Not open for further replies.

trueharted

Programmer
Feb 12, 2002
66
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top