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

Filtering

Status
Not open for further replies.

dplotts

MIS
Jul 28, 2003
48
US
On a form I have it setup to filter with a combo box for either project name or project number. The code coresponding to this is:

Project Number:

Private Sub Combo159_AfterUpdate()
DoCmd.ApplyFilter , "ProjectNumber=" & Me.Combo159
End Sub

Project Name:

Private Sub Combo288_AfterUpdate()
DoCmd.ApplyFilter , "ProjectNumber=" & Me.Combo288
End Sub

I use this same exact code on another form and it works fine. When I try to filter using the project name box, I get a run tim error 3075, Missing operator.

Both combo boxes are unbound and have the correct source (projectname or project number)

Does anyone have any idea what the problem could be?
 
Hi dplotts,

Unless your Project Name is numeric, it needs to be in quotes.

Code:
DoCmd.ApplyFilter , "ProjectNumber=
Code:
'
Code:
" & Me.Combo288
Code:
 & "'"
Code:


Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top