Search Form Problem

andy_dyer

Registered User.
Local time
Today, 13:30
Joined
Jul 2, 2003
Messages
806
Hi,

I have a list of over 3500 street names & their electoral wards.

What i would liek to do is have 26 command buttons with every letter of the alphabet on them and when you click on one, a list box underneath updates with all the street names and their wards.

I haven't had to do anything like this in ages and cannot think where to begin getting this working correcty...

If anyone could help start me off in the right direction...

:confused:
 
Why don't you create the unbound field on the main form where you can type just one letter ...
in the query which feeds the records for subform create additional field which will extract the 1st letter from the address line. Link the subform to this unbound field and in the "on change" property attach a code :
me.yoursubform.requery

if you don't want the subform to be refreshed automatically create a button with on click property
me.yoursubform.requery.
 
Try the attached sample, I made it from an old 97 db I had.

If it is not what you want maybe it will give you some ideas.


Regards,
 

Attachments

Just add necessary fields to the table the query and the listbox, then you've got it. You can also move and resize the buttons however you want.

Note I've referred each button click to the same function.
 

Attachments

Just like the buses it took me ages to find these solutions and here i have two in one answer - -thanks to both of you i modified mine a little so that whatever size the form - i can change the length of the option box and the buttons will stretch or shrink accordingly
 

Attachments

Users who are viewing this thread

Back
Top Bottom