F
fpcsql
Please help me with the following which is driving me insane:
In my application, users are required to log in - not using microsoft
security. Have table with userid, username, password and level of access
allowed per user. (security table)
These users will choose items from a combo box to print. The problem lies in
restricting each user to print only his / her allowed items (at a record
level) from the detail table.
So this combo box lists the items found in the detail table on condition
that the userid = the user id on the security table for the user logged in at
that time.
I have stored the userid as a public variable in a module, but am still
having problems in restricting the data list displayed in the combo box. I
think there is something wrong with my syntax.
Dim rst As Object
Dim uid As String
Set rst = Me.Recordset.Clone
uid = User.SecurityID
rst.FindFirst "[SchemeName] = '" & Me![scheme] & "'" & "[UserID] = '" &
uid & "'"
rst.Close
Another question is would it be a problem storing the userid as a public
variable, since it is a multi-user application?
I'd appreciate any help - Thanks
In my application, users are required to log in - not using microsoft
security. Have table with userid, username, password and level of access
allowed per user. (security table)
These users will choose items from a combo box to print. The problem lies in
restricting each user to print only his / her allowed items (at a record
level) from the detail table.
So this combo box lists the items found in the detail table on condition
that the userid = the user id on the security table for the user logged in at
that time.
I have stored the userid as a public variable in a module, but am still
having problems in restricting the data list displayed in the combo box. I
think there is something wrong with my syntax.
Dim rst As Object
Dim uid As String
Set rst = Me.Recordset.Clone
uid = User.SecurityID
rst.FindFirst "[SchemeName] = '" & Me![scheme] & "'" & "[UserID] = '" &
uid & "'"
rst.Close
Another question is would it be a problem storing the userid as a public
variable, since it is a multi-user application?
I'd appreciate any help - Thanks