Hi,
I using a query I have used a thousand times and for the life of me can't see why it will not work this time!
I have a table TblLocalVars. One of the fields in this table is UserID which is a text field. I am running on NT4 workstations.
The SQL for my Query is:
SELECT *
FROM TblLocalVars
WHERE (((TblLocalVars.UserID)=Environ("username")));
This should select a complete record for the user ID that is currently logged on.
Unfortunately I get the following error;
Compile error in query expression '(((TblLocalVars.UserID)=Environ("username")))'.
My user ID exist in the table and if I run the following Query;
SELECT *
FROM TblLocalVars
WHERE (((TblLocalVars.UserID)="2972972"));
My record is returned. (My NT UserName is 2972972)
Has anyone experienced this? What have I done wrong?
I using a query I have used a thousand times and for the life of me can't see why it will not work this time!
I have a table TblLocalVars. One of the fields in this table is UserID which is a text field. I am running on NT4 workstations.
The SQL for my Query is:
SELECT *
FROM TblLocalVars
WHERE (((TblLocalVars.UserID)=Environ("username")));
This should select a complete record for the user ID that is currently logged on.
Unfortunately I get the following error;
Compile error in query expression '(((TblLocalVars.UserID)=Environ("username")))'.
My user ID exist in the table and if I run the following Query;
SELECT *
FROM TblLocalVars
WHERE (((TblLocalVars.UserID)="2972972"));
My record is returned. (My NT UserName is 2972972)
Has anyone experienced this? What have I done wrong?