What the heck does this mean??!!
I'm running the following code in the On_Open event of a report:
The code breaks on strFirstName... I have a table called UserDetails, a field called FirstName & a field called UserID... so whats the problem?! Its got to be somthing really basic that'll make me feel a right plum, but I can cope with that if I can get it solved! (btw, I'm logged in as "admin" therefore strUser will be 'admin')...
TIA
Code:
Run-time error '2471':
The expression you entered as a query parameter produced this error: "The object doesn't contain the Automation object 'admin'."
I'm running the following code in the On_Open event of a report:
Code:
Dim strUser As String
Dim strFirstName As String
Dim strLastName As String
strUser = CurrentUser
strFirstName = DLookup("[FirstName]", "UserDetails", "[UserID] = " & strUser)
strLastName = DLookup("[LastName]", "UserDetails", "[UserID] = " & strUser)
The code breaks on strFirstName... I have a table called UserDetails, a field called FirstName & a field called UserID... so whats the problem?! Its got to be somthing really basic that'll make me feel a right plum, but I can cope with that if I can get it solved! (btw, I'm logged in as "admin" therefore strUser will be 'admin')...
TIA