BenHarper
08-24-2000, 07:05 AM
How would I go about creating a find/search window that 1) is not the built-in find tool, 2) asks the user to input only two fields: first name and last name (or just last name of the client), then calls up that record in the form. I find that the built-in find tool is very inconsistent, particularly when the last name appears a number of times in a record. It's also a pain to show the computer-illiterate here how to use it.
I would appreciate very much any help I receive.
Thanks in advance,
Ben
rjohnstone1
08-24-2000, 07:31 AM
have the user input info into the two fields.
Then use dlookup in your vba code to find the records. You could also apply a filter after the info is input which would also find any records with that information
BenHarper
08-25-2000, 04:35 AM
I probably should have mentioned that I am still a novice with Access, and so I might need a little more help than this. I understand the idea, but I don't know vba very well, so if you could give me an exmaple of the code to do this, I would very much appreciate it.
Thanks again,
Ben
jaxbuilder
08-25-2000, 09:00 AM
I use these "find boxes" all over my forms and they are VERY popular with the users. Basically, I create a combo box control using the wizard and select the option "Find a record on my form based on the value I selected in my combo box". You will then get a dialog allowing you to select what fields you want displayed (in your case you would select last name and first name). I then delete the label from the control which the wizard creates, and size the combo box so it it no wider than its button. I place it directly to the right of the control it is associated with (that is, if this combo box is displaying names, I would position it on the form directly to the right of the name field. I even have some of these "find boxes" associated with combo boxes. When the user clicks on the "find box" arrow, the combo box drops down and lists all the available records. I usually go to the properties and increase the number of rows displayed from the default 8 to 30 or so, and also add an sql "ORDER BY" clause to the row source generated by the wizard so the information is displayed in a sensible fashion. The user can scroll through the list and click on an item, and then the form positions to that record.
[This message has been edited by jaxbuilder (edited 08-25-2000).]