Find Record

GizmoT

Registered User.
Local time
Today, 21:24
Joined
May 28, 2003
Messages
86
I have a form which holds all of our client records in alphabetical order. I am trying to reduce the use of mouse finding it much quicker to use keyboard shortcuts.

I have a shortcut to launch the find record pop up, but when I have entered the customer name, I want the pop up box to automatically close, rather than having to close it manually. After it finds the first record, all I then have to do is tab through the records till I find the right one. Can this be done? Or do I have to design my own find record form?
 
just create a macro in the "after update" control in your fields properties to close the form.
 
Sorry - I don't think I explained very well. I am using Access's own find button from the toolbar - you know, the binoculars. It pops up a dialogue box(?) and it is this that I want to close after it has found the first record. I am sure it can't be done, and that I will have to redesign the form.
 
What about using this in the AfterUpdate property of your Customer Name field:

Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[CustName] = " & Str(Me![cboCustName])
Me.Bookmark = rs.Bookmark

You have a combo box to either drop down or type in the name and the related record comes up.
 
If you use jon98548's suggestion, just make sure the control you use for the search is an unbound control (meaning the controlsource is blank and not a field in the underlying table/query). Also, you might want to change the find code slightly to this:

rs.FindFirst "[CustName] = '*" & Str(Me![cboCustName]) & "*'"

so you can use it to find partial matches also.

Here are some other suggestions. You can design your own "pop-up" search form that works like a Windows dialogue box that will close once you enter your search parameters and hit OK. You can build a search section in the header of your form with fields (like the one jon98548 suggested) or even a series of 26 command buttons labeled A through Z like I have on one of my forms. Clicking one of those buttons brings up all users with lastnames beginning with that letter.
 
DOH! Forgot that part. Thanks dcx. Your idea sounds good, especially if you have a large customer base. I use mine with unique records and my user has a reference sheet.
 

Users who are viewing this thread

Back
Top Bottom