Command Buttons

geno

Registered User.
Local time
Today, 00:31
Joined
Jun 19, 2000
Messages
243
Hi, I don't know if this is even possible or not but here goes. I have a form with 26 cmd buttons each caption is the letter of the alphabet. I would like to have one query look at this form and which ever button is clicked, it will sort the table by that letter. Thanks
 
Check out the "Customer Phone List" form/query/macros in the Northwind Database.
It is exactly what you are asking for.
 
Thanks, this is exactly what I need.
 
I have another question for you. I got the macro to work Ok, but there is a message box that is suppose to come up when there are no records found ( [currentrecord]=0 )then a message box should come up. What happens is that when the filter is run, even if there are no records found, one record is shown in the form so no message box is displayed. Do you know how to get around this?
Thanks
 
Hi again, I was trying to get this to work and found out if I go into design view then back to form view, the message box will then display. Do you know how to get around this?
Thanks
 
When you go from Design View back to Form View, your form reruns its code, and thus prompts you again. Consider moving this code behind a command button if you do not want to see it every time, but keep in mind that you won't be editing it forever...(we hope).

HTH,
David R
 

Users who are viewing this thread

Back
Top Bottom