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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help with this code

Status
Not open for further replies.

Travis33

Programmer
Nov 20, 2000
31
US
I HAVE THIS CODE BELOW THAT i AM TRYING TO HAVE MY FORM WHEN I ENTER IN NUMBERS INTO A COMBO BOX SCROLL THROUGH THE RECORDS THAT MATCH PART OR ALL OF THE STRING.

**********************************************************
Dim db As database, rst As Recordset, strsql As String
Set db = CurrentDb
Str = "select * from [mtusparts01 query]= " & Me.[partnumber] & " * "
Set rst = db.openrecordset(strsql)
If rst.RecordCount >= 1 Then
Me.RecordSource = strsql
Else
Exit Sub
End If
rst.Close
Set db = Nothing
***********************************************************

when I try to compile the code it gives me an error on
me.[partnumber]
it tells me "Argument Not Optional"
How do I fix this so my code will run
Thank You,
Travis
 
Try, Me![partnumer] instead of Me.[Partnumber].

A 'bang' instead of a dot. ;-)
Amiel
amielzz@netscape.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top