Sort not holding in form combined field (1 Viewer)

Tina49

Registered User.
Local time
Yesterday, 21:50
Joined
Sep 29, 2011
Messages
34
I have a field on a form called ChemID. This field is made up of two fields, ChemID and ChemName. Only ChemName is displayed. I have a query assoicated with the form that sorts by ChemName; however, the form always displays the original sort of ChemID. Any help would be appreciated. Here is the query

SELECT Chemicals.ChemID, Chemicals.ChemName FROM Chemicals
UNION
SELECT Chemicals.ChemID, Chemicals.AltName1 FROM Chemicals WHERE Chemicals.AltName1 IS NOT NULL
UNION SELECT Chemicals.ChemID, Chemicals.AltName2 FROM Chemicals WHERE Chemicals.AltName2 IS NOT NULL
ORDER BY Chemicals.ChemName;
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 14:50
Joined
Jan 20, 2009
Messages
12,852
Check the form properties. It may have an OrderBy and OrderByOnLoad applied there.
 

Tina49

Registered User.
Local time
Yesterday, 21:50
Joined
Sep 29, 2011
Messages
34
Yes, I had already set that, but it does not seem to make a difference.
 

vbaInet

AWF VIP
Local time
Today, 05:50
Joined
Jan 22, 2010
Messages
26,374
Does it show the right sort order when run as a query?

Are you opening the form in Datasheet or Continuous View?
 

Tina49

Registered User.
Local time
Yesterday, 21:50
Joined
Sep 29, 2011
Messages
34
Yes, the query runs just fine. Running in form view.
 

Users who are viewing this thread

Top Bottom