Drop-Down in Form Values Sorting (1 Viewer)

psyc0tic1

Access Moron
Local time
Yesterday, 19:51
Joined
Jul 10, 2017
Messages
360
Hi all,

I have a form that starts off people using a drop down to select their record in the database table that needs updating. The drop-down displays the PO number, the Part Number, and the Part Description. What it doesn't show is that it is only displaying information that has a status of "Waiting on Lab" in one of the database table fields.

Once a selection has been made it populates the form with some data and awaits the user to finish the empty fields and they submit the updates.

Here is what I am trying to fix.

In the drop-down the information is apparently ordered by the "AuditID" (primary key & not visible) number which is sequential and this is fine with me but the users want the drop-down list to be ordered on the PO Number. I have included the query below. Can anyone tell me what to edit in it to make this happen?
Code:
SELECT [Audit Data].AuditID AS Expr1, [Audit Data].[PO Number], [Audit Data].Status, [Parts].[Part Number] & " - " & [Parts].[Part Desc] AS Expr2 FROM [Audit Data] INNER JOIN Parts ON [Audit Data].[Part Number] = Parts.ID WHERE ((([Audit Data].Status)="Waiting on Lab"));
 

psyc0tic1

Access Moron
Local time
Yesterday, 19:51
Joined
Jul 10, 2017
Messages
360
A screenshot of the grouping I am asking about showing they want me to get the PO numbers to be in order
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    58.9 KB · Views: 37

Minty

AWF VIP
Local time
Today, 01:51
Joined
Jul 26, 2013
Messages
10,366
Add an
Code:
Order By [Audit Data].[PO Number]
To your SQL query
 

psyc0tic1

Access Moron
Local time
Yesterday, 19:51
Joined
Jul 10, 2017
Messages
360
DUH never mind... I added the sort in the query in design view so I didn't have to figure out where to put it in the SQL

Thanks Minty
 

Users who are viewing this thread

Top Bottom