malformed GUID in query expression
malformed GUID in query expression
(OP)
Not sure what I am doing wrong here...
The following code gives a malformed GUID in query expression message:
But have no problems when I place this in a query SQL as:
What am I doing wrong?
Thanks
The following code gives a malformed GUID in query expression message:
CODE -->
Set rs = CurrentDb.OpenRecordset(strSql, dbOpenDynaset) strSql = "Select * from PC_SP_Line_tbl order by SP,[Line Number]"
But have no problems when I place this in a query SQL as:
CODE -->
Select * from PC_SP_Line_tbl order by SP,[Line Number]
What am I doing wrong?
Thanks
RE: malformed GUID in query expression
Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
RE: malformed GUID in query expression
I am not setting the value of strSQL after I set rs...
I was playing around with this and noticed that if I change the code from
CODE -->
to
CODE -->
then I no longer get the error message, but I want this to be sorted by SP and then Line Number....
So then, I replaced [Line Number] with 'Line Number and this does not give an error message but this is not sorting the table by the fields SP and Line Number like a query does.
The Query with this SQL:
CODE -->
Creates this sorted order:
1
But after the following lines of code:
CODE -->
the Line Number of the record after the rsx.MoveFirst is Line "6" instead of '5"
Something is not right with this...
thanks
RE: malformed GUID in query expression
Looks to me that you do not need 2 record sets, you just need one record set with those 2 tables joined.
Have fun.
---- Andy
There is a great need for a sarcasm font.