Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Enter of Data after Form Exit/New Record

Status
Not open for further replies.

gyli84

MIS
Aug 6, 2001
67
0
0
GB
I have a textbox on the form called "Logged By". I have a value on another form [Forms]![Helpdesk Staff Switchboard]![Name] which has the name of the person logged in and I would like for this value to be entered into the "Logged By" field on the "Calls" form when the user has finished logging the current problem and clicks to move to a new record/exits the form.
To ensure that no blank records are created though I also need for the user to only be able to move to a new record/different record or exit the form after certain fields say field1, field2 and field3 have been filled in. Is it possible to do If then statements where there are multiple criteria and if so how would this be applied so that someone could not progress to the next record or be able exit the form until certain fields were filled in?
 
Part 1

Set the default value of the record field to the value of the text box! (use the code generator)

Part 2

Set the properties of the mandatory fields in the table to required and the user will not be able to create a record without entering data into those fields (easier that writing code) and this will be true of any entry against that table from anywhere
 
With regards to my first question, I cannot set it as my default value as different users log in (my database has been set up with workgroups and user level security) and thus the field "logged by" will constantly change when I actually want it to show the name of the person who originally logged the call.

Do you think I could put an If statement on before form update to see if "Logged By" is null and if not to place the CurrentUser's Name into the "Logged By" field. Would this work?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top