Sort Order on Form

Aklfishboy

New member
Local time
Tomorrow, 07:28
Joined
Sep 13, 2021
Messages
4
Hi. I have read many answers to my problem.

I have a form based on a table, which I use to update said table. I have a combo box to find the right records to update. My issue is the data is not sorted by the order I want to see.

I understand the table is just large data repository. I have tried on the form to Order By on Load - doesn't work. I have tried setting up via query through the Query Builder to sort - doesn't work. I have tried to make/append a new table in the order I want and then adding an autonumber - doesn't work.

Now just about to throw my laptop out the window in frustration..... :).

Obviously doing something wrong.

Hoping some one can help.

Thanks
 
Hi. Welcome to AWF!

What is in the Record Source property of your form? Can you please show it to us?

If you create a query based on your table and add an ORDER BY clause to it, does the record appear in the order you want when you open the query?
 
Hi, thanks for your reply. Excuse my ignorance, how do you wish me to show you the table? And second yes the query sorts to the order I want, but the combo box still shows in a random order. I've then deleted the combo box and reinserted a new one and then the form doesn't show the records I'm selecting in the new combo box....
 
Hi. I may have misunderstood your question. Were you trying to sort the records shown on the form? Or, were you trying to sort the items shown in the dropdown list of a combobox? Also, I was asking you to show us what is in the Record Source property of the Form. I wasn't asking you to show us your table. In any case, please clarify first what the actual question is by answering the question I asked at the beginning of this post. Thank you.
 
1631511222246.png
Hi is this what you mean....this is my record source, in answer to your second question its the sorting in the combo box I wish to sort. Thanks
 
use Query to sort your Combo.
on its Row Source:

select field1, field2 from table1 Order by field1
 
Arnel's answer is correct. I'll amplify by explaining that the form has a record source. Even though the combo appears to have the same record source, it actually does not. The form's data comes from whatever is specified as .RecordSource but the combo box data comes from .RowSource, which is technically a different entity even if you filled in identical queries for both sources. They are like two channels that COULD be tuned to the same program - but they ARE different. So changing the order shown on the form doesn't affect the order shown in the combo, and vice versa.
 
Right, thanks for the help, got it working! Appreciate the explanation Doc, understand now. Cheers
 
Right, thanks for the help, got it working! Appreciate the explanation Doc, understand now. Cheers
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom