468,301 Members | 1,556 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,301 developers. It's quick & easy.

Adding Filter

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
1 1057
1,418 Expert 1GB
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.

Similar topics

reply views Thread by Sam Vanderstraeten | last post: by
reply views Thread by Cybermedia Marketing | last post: by
28 posts views Thread by Ilias Lazaridis | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.