Make form filter by user

  • Thread starter Thread starter Jacques
  • Start date Start date
J

Jacques

I posted this in the forms thread but I think the issue is my query so I'm
posting it here as well.

Hello all,
I'm trying to make a form open either the tables or query based on who
logs into the database (security is set and works) so that users can do
dataentry into their own timesheet records, without seeing everyone elses
records.

I have security setup nicely.
I can put CurrentUser() into a query, lock the query down so users can use
it but not edit it, and the corresponding form works fine...until you try to
add a second record - then the usersname disappears from the form because
the system wants you to add a new user. I'm confused.
My join in the query says to use all records from the Staff table, and only
those that match from the WorkLog table.

Any ideas will be appreciated.

Jacques
 
I can put CurrentUser() into a query, lock the query down so users can use
it but not edit it, and the corresponding form works fine...until you try to
add a second record - then the usersname disappears from the form because
the system wants you to add a new user. I'm confused.

You may need to also set the Default property of the textbox to
CurrentUser(); or make this Form into a Subform and use a textbox on
the mainform with =CurrentUser() as its control source as the Master
Link Field.

John W. Vinson[MVP]
 
Back
Top