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

how to make "search" button function

P: 18
Hello,

I have a problem when I run search, I have fields for: name, clientID and phoneNo. When a client calls I need to find them in the database, they might give me the name and it might not be spelled correctly, I need to search by phoneNo. (the fastest way!) I place the cursor in the appropriate field and click search. when the find window opens up, by default, the Look in: field is: 'Main application form: form' and the 'search field as formatted' is dissabled. I have to choose the name of the field from the list, close the search window, then click search again, now the 'search field as formatted' is enabled and I can unclick it. this is timeconsuming when client is on the phone.
how can I make the default search window to have the name of the field and the 'search field as formatted' enabled and unclicked!
Hope someone can help.
thank you in advance.
nour
Nov 21 '08 #1
Share this Question
Share on Google+
1 Reply


P: 49
I found that creating a combo box with the following code in the afterupdate event seems to work very well. You can type in your search value. I do this in most of my forms where the user needs to search for a record.
"code"
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Project ID] = '" & Me![projidselect] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
"code"
Nov 25 '08 #2

Post your reply

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