I am trying to create an access file that is similar to a address book
or rol-o-dex. What I would like it to do is have a line of buttons
each with a different letter on it, when one of the letters is pressed
it only shows those entrees that start with that letter. I have tried
every thing i can think of but i can not get the buttons to work?? Any
suggestions? my direct email address is andy_lt@comcast.net
Thanks Andrew
Allen Browne - 31 Jul 2006 14:34 GMT
Andrew, open the Northwind sample database.
Open the Customer Phone List form.
That's your best chance of figuring out how to do something like this.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I am trying to create an access file that is similar to a address book
> or rol-o-dex. What I would like it to do is have a line of buttons
> each with a different letter on it, when one of the letters is pressed
> it only shows those entrees that start with that letter. I have tried
> every thing i can think of but i can not get the buttons to work?? Any
> suggestions? my direct email address is andy_lt@comcast.net
ManningFan - 31 Jul 2006 14:42 GMT
Here's a thought.
2 columns; one with First Name, one with Last Name. If you click the
"A" button, search the Last Name column for Like A*.
I'd love to know what you DID try, because I can't think of any other
way to do it.
> I am trying to create an access file that is similar to a address book
> or rol-o-dex. What I would like it to do is have a line of buttons
[quoted text clipped - 4 lines]
>
> Thanks Andrew
Keith Wilby - 31 Jul 2006 14:44 GMT
>I am trying to create an access file that is similar to a address book
> or rol-o-dex. What I would like it to do is have a line of buttons
[quoted text clipped - 4 lines]
>
> Thanks Andrew
In the buttons' click event you could have something like (air code,
untested):
strSQL = "Select * from tblMyTable where [Surname] like 'A*'"
Me.RecordSource = strSQL
You'd need to declare strSQL as a public string variable (at the top of the
form's module) so that the code in buttons B-Z can use it. You could also
reference the command button caption property if you didn't want to
hard-code each letter.
HTH - Keith.
www.keithwilby.com