Gilberto Sanches
asked on
Checkbox fixed information into Access table
Hi experts,
I need your help for a button or something like that to keep repeating a certain value until the button is unchecked.
Background:
Daily we insert around 40 recordsets of daily production into a Acces table. A split form is used for friendliness to insert data into a table.
Now certain informations for that period stays the same, like the date, the user, location and so on. Only a small part is new. But the information that is fixed for that period also needs to go into the table.
At the moment we have to reinsert the fixed information for that period manually. How can we automate this with a button or checkbox?
I need your help for a button or something like that to keep repeating a certain value until the button is unchecked.
Background:
Daily we insert around 40 recordsets of daily production into a Acces table. A split form is used for friendliness to insert data into a table.
Now certain informations for that period stays the same, like the date, the user, location and so on. Only a small part is new. But the information that is fixed for that period also needs to go into the table.
At the moment we have to reinsert the fixed information for that period manually. How can we automate this with a button or checkbox?
You don't need a button or the like, do it automatically in the AfterUpdate event of the form by setting the DefaultValue of the controls, like:
Me!OrderDate.DefaultValue = Me!OrderDate.Value
Me!UserID.DefaultValue = Me!UserID.Value
Me!LocationName.DefaultValue = "'" & Me!LocationName.Value & "'" ' wrap text in quotes.
I would go with Gustav's recommendation, that is what I do. Then, when you uncheck the checkbox or un-toggle the button, just set those default values back to NULL.
Dale
ASKER
Okay, haven't applied the steps yet.. will do it soon. Thanks for the advise so far.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
For example you have field1,field2...fieldn that you need to repeat them.
So just after
Open in new window
Open in new window
and in the Current event
Open in new window
and of course in the After Update of each fieldOpen in new window