How to default CurUser() into a field in a new record in a Select




In my project I have a select query showing data from a single table. This
works well in that it allows the user to view/ edit the existing data and
also to create new records.

When creating new records, I need to record the CurrentUser() and
CurrentDate() into fields on the record. I can do the date via the ‘Default
value’ on the table but can’t set the User field as CurrentUser isn’t
available. Any ideas on how can I do this?

If I scrap the ‘select query’ and carry out record admin via a form I can do
it. Trouble is I value using the ‘select query’ as it allows the user to see
more records of their data and removes complexity.


Trouble is I value using the 'select query' as it allows the user to see
more records of their data and removes complexity.

how is it that the user can see more records in a query's Datasheet view
than can be seen in a form's Datasheet view? as for removing complexity, you
obviously need a little "complexity" to get the setup you want. IMHO,
allowing users to edit data via an open SELECT query is no better than
allowing them to edit data directly in an table - which is something i
never, ever do under any circumstances. use a form, hon, it doesn't need to
be any more complex than you need it to be to get the job done right.



I knew the answer was easy when you knew what it was.
I'd realised I was one of the new kids on the block, given what I have done
with Access, I hadn't realised I was still that new.

Oh well.

Thanks for the help.



Fortunately, I have 'secured the database' so should have this covered.
Thanks for the thought though.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question