Sort Form by text box

G

Guest

I am designing a form that has a combo box that looks up a customer number and a text box that displays the customer name (data pulled from the combo box and not stored a second time). Upon opening the form, I would like to run an event procedure that sorts the records by the text box, as if I had clicked on the text box and clicked the sort from a-z button.

When I go into form design, and type [Event Procedure] on "On Open", what code should I input?
 
P

PC Datasheet

You don't need any code! Just base your form on a query that is based on the
table and set the sort to Ascending for the field that the textbox is bound to.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


Beverly76 said:
I am designing a form that has a combo box that looks up a customer number and
a text box that displays the customer name (data pulled from the combo box and
not stored a second time). Upon opening the form, I would like to run an event
procedure that sorts the records by the text box, as if I had clicked on the
text box and clicked the sort from a-z button.
When I go into form design, and type [Event Procedure] on "On Open", what code should I input?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top