Sorted out this problem. I put in a two second wait between assigning
the query the sql string, and before the dcount command.
I think the machine hadn't quite finished assigning the sql string to
the query and this was interfering with the navigation of the
recordset using dcount (or any domain functions)
Anyway! Thanks!
Richard
On Tue, 23 Jan 2001 14:07:19 -0500, "Viktor Umanskiy"
Quote:
>What is strSQL?
>> I'm running the following code:-
>> Set db = CurrentDB()
>> Set qdf = db.QueryDefs("qdfOrderExport")
>> qdf.SQL = strSQL
>> lngRecordCount = nz(DCount("[OrderID]","qdfOrderExport")
>> At this line I'm getting a Error 3167 message.
>> I am flummoxed. Can anybody help
>> Appreciated.
>> Richard
>> Sent via Deja.com
>> http://www.deja.com/