Unanswered: Using a value from a form object as a default value in a table field?
I have started working on a small database that uses a login system.
I am trying to assign the CURRENTUSER value as the default value in a table field, this should provide a personalized 'stamp' on the records created by each user. However, I understand that I cannot use this expression directly within the table.
Therefore, I was hoping I could take this value from a form textbox field that uses CURRENTUSER as a control source to display the name of the user logged in.
Is it possible to use the value of a form object (a textbox) as a source for a default value in a table field?
If so, please can you give an example of the code required and let me know where to put it.
I would REALLY appreciate any advice on this as this problem is like an itch I can't scratch!!! Or of course if there is a better way to automatically 'tag' a new record with the name of the Current user, I'd love to hear about that!!!
the easiest way is to use a form to enter the data. build a form (using the form wizard is fine) and in the filed that you want the user name to go in set the default vaule (n the properties) to:
ensure that this filed is locked and not enabled (so your users can't change it (unless you want them to be able to)) or you could make it hidden (set visable = false so they can't see it) and when they create a new record it will add the username for you.