neillovell
Programmer
As you may have read, I have converted a form in to a data access page (.htm). The form is based on a query that retrieves records from a table based on the value of CurrentUser(). Ergo, the user only has access to records that are relevant to them.
My SQL uses a WHERE clause to retrieve the records,
WHERE (((ADMINRecordsTable.LogOnName)=CurrentUser()));
This however has led to errors when accessing the records from outside access. I put the .htm file (along with the database itself and updated the connection strings) onto the network and double clicked it, entered my password, but unfortunately it tells me
'Data provider failed when performing provider command'
followed by
'CurrentUser() undefined'
I tested a bit and found that
WHERE (((ADMINRecordsTable.LogOnName)=neil-lovell));
works perfectly, all records matching neil-lovell are retrieved and the user can change, add, and save no problem. However, this is not much good if you are not Neil Lovell!!!
I have found that
WHERE (((ADMINRecordsTable.LogOnName)=CurrentUser));
(note the lack of () ) brings up a dialog box asking for the parameters for LogOnName and CurrentUser. If I specify neil-lovell for both of these I get access to the entire set of records.
Has anyone come across this before?
My SQL uses a WHERE clause to retrieve the records,
WHERE (((ADMINRecordsTable.LogOnName)=CurrentUser()));
This however has led to errors when accessing the records from outside access. I put the .htm file (along with the database itself and updated the connection strings) onto the network and double clicked it, entered my password, but unfortunately it tells me
'Data provider failed when performing provider command'
followed by
'CurrentUser() undefined'
I tested a bit and found that
WHERE (((ADMINRecordsTable.LogOnName)=neil-lovell));
works perfectly, all records matching neil-lovell are retrieved and the user can change, add, and save no problem. However, this is not much good if you are not Neil Lovell!!!
I have found that
WHERE (((ADMINRecordsTable.LogOnName)=CurrentUser));
(note the lack of () ) brings up a dialog box asking for the parameters for LogOnName and CurrentUser. If I specify neil-lovell for both of these I get access to the entire set of records.
Has anyone come across this before?