Alphabetical order

  • Thread starter Thread starter Peggy
  • Start date Start date
P

Peggy

Data is entered in my table via a form. One of the command
buttons on my form allows me to select a customer from a
list. When I select this a customer that customers form
comes up. The list is, of course, in the order they were
entered intitially. Can I make this list in alphabetical
order? Do I make this in datasheet view of the table? Will
the forms now also appear in that order? If I add a new
customer are they at the end of the list or do they slide
into their alphabetical spot?
 
Hi Peggy,

I am fairly new to the access world myself and had a
similar problem originally. I created a query
called "Company List" and placed an Ascending sort on it.
Then set the row source of my drop-down menu as the query.

If you want to list all the companies in a form you can do
this too by creating another form or sub-form and
designing it as "continuous forms"... In the properties,
just set the Record Source as the query.

I hope I've been able to help out.

Regards,
Averil
 
That didn't really do it. When I select the name on the
list I want it to go to that form. If I base my list on an
ascending query it doesn't go to that form.
 
Peggy,

It is not really clear what or where this "list" you are selecting a
customer from is. Is it a combobox, or a listbox, or a subform, or
something else? And where is the command button? And what does it do,
i.e. what are the details of the macro or vba procedure that is running
on the button? If your button is supposed to open the form at the
record as indicated by the customer selected in your "list", then
sorting the list as suggested by Averil should not make any difference.
 
I am using the combo box wizard to add a combo box to a
form. There is a form for each customer. The first
question the wizard asks is "where do you want your combo
box to get it's values?". I select the third option which
is "Find a record on my form based on the value I select
in the combo box". When it asks me where this data is
stored I select the table, customers. I select the
customers first and last name. I would like the list in
the combo box to be in alphabetical order instead it is
the order the customers were entered on the form.
 
Peggy,

Thanks for the explanation. If you look at the Properties of the
combobox, in the Row Source property I imagine you will see soemthing
like this...
SELECT CustomerID, [First Name], [Last Name] FROM Customers
If not, just post back with what you do see in there. But if it is,
just add this on the end...
ORDER BY [Last Name]
 
I bow down before the gods of Access. Thank you.
-----Original Message-----
Peggy,

Thanks for the explanation. If you look at the Properties of the
combobox, in the Row Source property I imagine you will see soemthing
like this...
SELECT CustomerID, [First Name], [Last Name] FROM Customers
If not, just post back with what you do see in there. But if it is,
just add this on the end...
ORDER BY [Last Name]

--
Steve Schapel, Microsoft Access MVP

I am using the combo box wizard to add a combo box to a
form. There is a form for each customer. The first
question the wizard asks is "where do you want your combo
box to get it's values?". I select the third option which
is "Find a record on my form based on the value I select
in the combo box". When it asks me where this data is
stored I select the table, customers. I select the
customers first and last name. I would like the list in
the combo box to be in alphabetical order instead it is
the order the customers were entered on the form.
.
 
Back
Top