paulfenwick
Technical User
Hi, I'm trying to write a data access page that includes data related to the current logged on user. I have a combobox that pulls data from a query that uses the
Environ("username")
i.e. the query in SQL view is:
SELECT Personnel.Manager
FROM Personnel
WHERE (((Personnel.Initials)=Environ("username")));
function and saves this in a text field in the table. It all works fine when previewed in access but when opening the page in explorer, I get the error message "Data provider failed while executing a command" then "Unknown function name".
Is there another way to select records / info on a data access pages based on the current user?
I guessing I will need some VBA code in the page but I'm not very up on this
Environ("username")
i.e. the query in SQL view is:
SELECT Personnel.Manager
FROM Personnel
WHERE (((Personnel.Initials)=Environ("username")));
function and saves this in a text field in the table. It all works fine when previewed in access but when opening the page in explorer, I get the error message "Data provider failed while executing a command" then "Unknown function name".
Is there another way to select records / info on a data access pages based on the current user?
I guessing I will need some VBA code in the page but I'm not very up on this