Simple Update question (1 Viewer)

spectrolab

Registered User.
Local time
Tomorrow, 04:48
Joined
Feb 9, 2005
Messages
116
Hi All,

Many thanks to all who have helped in the past.

I have a form which is linked to a table, pretty standard.

The form header has a combo box for the user to select their user name when they are entering data. Each record has 5 fields and when the final field is updated I would like to automatically grab the user name from the combo box and update the appropriate field in the table with this value, but not every record in the recordset shown on the form, just the one recently completed. I hope that makes sense.

Also, is there anyway to make the fields in the form not updateable if the username combo box is not completed?

I know this should be pretty easy, but I can't seem to get my head around it. Thanks for your help!
 

boblarson

Smeghead
Local time
Today, 13:48
Joined
Jan 12, 2001
Messages
32,059
Did you know you don't really need the combo box for the user name? You can get their domain login by using:

http://www.mvps.org/access/api/api0008.htm

And then you can add it to the field in the form's Before Update event, if the fields are filled out and if the field has not already been filled.
 

spectrolab

Registered User.
Local time
Tomorrow, 04:48
Joined
Feb 9, 2005
Messages
116
Thanks Bob

That could work pretty well, I have tried it using Allen Browne's audit trail procedure and it worked as it was supposed to, the only issue I had was that we have one machine in our network that has a generic login (it is used for data capture from an instrument) and also runs the software for the instrument. People being as they are, tend to use this computer instead of logging themselves in.

I will look at what we do and see if there is a way around it. I was trying to set it up so that they couldn't enter any data without logging themselves in to the db, but forcing them to actually login correctly to the network makes more sense.

Thanks for your help
 

Users who are viewing this thread

Top Bottom