Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using docmd.findrecord for name index list 1

Status
Not open for further replies.

davyre

Programmer
Oct 3, 2012
197
AU
Hi,
I have an index list in my form (A-Z) for quick search on CustomerName field, think of it as quick scroll on iPhone Contacts but this one you have to click on each alphabet instead of swiping the screen.
So this listbox has A-Z and what I want is if user click on letter C, it goes to record with customer name begins with C.
In the listbox afterclick event, I have this:

Code:
DoCmd.FindRecord Me.AlphList.Value, acAnywhere, False, acSearchAll, False, acAll, True

but when I click on the list, it shows error: a macro set to one of the current field's property failed because of an error in FindRecord argument. Anyone can help with this? Or is there any better solution other than using FindRecord? Thanks
 
The combobox has a wizard to find a record on the form. If you look at that code, you should be able to do about the same thing except use the like operator instead of equal to find the value.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top