By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,124 Members | 2,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,124 IT Pros & Developers. It's quick & easy.

Adding Filter

P: 1
If any one can help me please
i am trying to add a fliter to a search in a form.
the form is used this way

the user inters a project number then the seach will conduct the search using the code below, which works fine.
i need to add a filter so the users can only see and brows through the project number they have entered in txt search which can be multiple records with the same project number.


ProjectRef = ProjectNumber.Text
strSearch = txtSearch.Text

'If matching record found sets focus in ProjectNumber and shows msgbox
'and clears search control

If ProjectRef = strSearch Then
MsgBox "Match Found For: " & strSearch, , "Congratulations!"
txtSearch = ""
Oct 5 '06 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,418
In fact you can do the search in your form in assigning the SQL condition to filter property in the form...

Or directly to the recordsource property modifing entierly your SQL behind your form!


Me.Filter ="Myfield='dfdfd'"


Best regards!
Oct 8 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.