Ascending Order of List

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a form that contains a subform.

My form displays transactons. I have a field called Trans_ID that pulls
information from the Transactions table such as number and type. Row Source
type is a query and source is tbl_transactions. I have a column count of 3.
When I preview my form , from Trans_ID I get a drop down list with the
dffererent types and numbers but they are not in alpabetical order. I would
like the types to be in order.

How would I go about doing this? I have tried opening the table
transactions and sorting the type alphabetically but that doesn't affect the
form.
 
Tina said:
I have created a form that contains a subform.

My form displays transactons. I have a field called Trans_ID that
pulls information from the Transactions table such as number and
type. Row Source type is a query and source is tbl_transactions. I
have a column count of 3. When I preview my form , from Trans_ID I
get a drop down list with the dffererent types and numbers but they
are not in alpabetical order. I would like the types to be in order.

How would I go about doing this? I have tried opening the table
transactions and sorting the type alphabetically but that doesn't
affect the form.

Change the rowsource to a SQL SELECT statement that orders the records
from tbl_transactions the way you want. For example (but this may not
be exactly right, since I don't know the names of your fields):

SELECT * FROM tbl_transaction ORDER BY Trans_Type;
 
I am using a combo box to retrive the data from tbl_transactions. I can't
change to rowsource to a SQL SELECT. I am only allowed to choose qry and
tables?
 
Tina said:
I am using a combo box to retrive the data from tbl_transactions. I
can't change to rowsource to a SQL SELECT. I am only allowed to
choose qry and tables?

Yes, you can. The Row Source Type property should still be
"Table/Query". With it set that way, and with Row Source set to
"tbl_transaction", just click on the Row Source line. A little button
with the caption "..." will appear at the end of the line. This is the
"Build" button. Click on that button, and tell it you want to build a
query based on the table. It'll open up a Query Design window in which
you can create the query. Drag all the fields for your combo box's
columns down onto the query grid, and add a sort specification for the
field you want to sort by. Then just close the query design window, and
it will ask if you want to update the rowsource property. Say yes, and
you're done.
 
Back
Top