supmktg
08-08-2005, 08:03 PM
I'm having a problem with the rowsource of a listbox. The rowsource query has a Group by clause, and if the recordcount is 0, it shows one fictitious row with an ID of 0 and a date of 11/30/1899 ( the rowsource query uses a linked table that I have no control over). If I remove the Group by clause, the fictitious record goes away.
I'm trying to add :
SELECT Count(*) AS TotalRecords
FROM qryConsTransCount;
to my vba code to determine if the rowsource should include the group by or not. How can I assign the above sql to a variable so I can do this:
If variable >1 then
'use rowsource that includes Group by
else
'use rowsource without Group by
end if
Thanks,
Sup
I'm trying to add :
SELECT Count(*) AS TotalRecords
FROM qryConsTransCount;
to my vba code to determine if the rowsource should include the group by or not. How can I assign the above sql to a variable so I can do this:
If variable >1 then
'use rowsource that includes Group by
else
'use rowsource without Group by
end if
Thanks,
Sup