P
Padraigini
Hi,
I have a comcobox on a form that when the form loads it changes from what
has been saved/set as the row source.
I have checked all the VBA a associated with the code and can find any that
could cause this to happen. To clarify the code that I want in the rowsource
is??
SELECT EmployeeLastName
FROM (SELECT 0 AS Sort, "< all >" AS EmployeeLastName FROM TimeEntry UNION
SELECT 1, EmployeeLastName FROM TimeEntry)
Q ORDER BY Q.Sort, Q.EmployeeLastName;
Then for some reason it changes to
SELECT EmployeeLastName
FROM [SELECT 0 AS Sort, "< all >" AS EmployeeLastName FROM TimeEntry UNION
SELECT 1, EmployeeLastName FROM TimeEntry]
AS Q ORDER BY Q.Sort, Q.EmployeeLastName;
which generates the error
"The record source 'SELECT EmployeeLastName
FROM [SELECT 0 AS Sort, "< all >" AS EmployeeLastName FROM TimeEntry UNION
SELECT 1, EmployeeLastName...' specified on this form or report does not
exist.
It would be brilliant if someone could tell me what I might be doing wrong
or what I should change to stop this happening.
Thanks in Advance
I have a comcobox on a form that when the form loads it changes from what
has been saved/set as the row source.
I have checked all the VBA a associated with the code and can find any that
could cause this to happen. To clarify the code that I want in the rowsource
is??
SELECT EmployeeLastName
FROM (SELECT 0 AS Sort, "< all >" AS EmployeeLastName FROM TimeEntry UNION
SELECT 1, EmployeeLastName FROM TimeEntry)
Q ORDER BY Q.Sort, Q.EmployeeLastName;
Then for some reason it changes to
SELECT EmployeeLastName
FROM [SELECT 0 AS Sort, "< all >" AS EmployeeLastName FROM TimeEntry UNION
SELECT 1, EmployeeLastName FROM TimeEntry]
AS Q ORDER BY Q.Sort, Q.EmployeeLastName;
which generates the error
"The record source 'SELECT EmployeeLastName
FROM [SELECT 0 AS Sort, "< all >" AS EmployeeLastName FROM TimeEntry UNION
SELECT 1, EmployeeLastName...' specified on this form or report does not
exist.
It would be brilliant if someone could tell me what I might be doing wrong
or what I should change to stop this happening.
Thanks in Advance