Update Main Form Field Value After Updating Field value In SubForm

DaveCollins181

Registered User.
Local time
Today, 14:13
Joined
Oct 27, 2014
Messages
45
I have a main form and a subform.

Both forms have the field called JobID in common.

Both forms have a field called JobStatus.

Can anyone provide the easiest solution so that After I Update the field called JobStatus in the subform, it changes the field called JobStatus in the main form to the value which was selected from the subform?.

I am not a coder so the easiest method would be appreciated. Many thanks, Dave
 
Storing the same information in two places, when they should always be the same is a bad bad idea and goes against all forms of a proper database design.

I suggest you revisit your design/requirements and see how to fix your issue there, rather than trying to create something that shouldnt exist.
 
Hi Namliam,

I am only storing the information in 1 x table but have 2 x fields which use that same information.

SUBFORM - In the table for job updates, a new record is created each time an employee changes the job status. They select a value change from the ComboBox JobStatus which gets its values from a table called TblJobStatus.

MAINFORM - The main form has a combobox field called JobStatus which gets its values from the TblJobStatus.

You can therefore see the information is only stored once but is used twice. In the Subform a new Jobstatus is selected each time a record is added. (So we can see what changes have occurred as the job moves on).

On the main form I only need the last status change from the subform to be displayed in the JobStatus field for that job if that makes sense?

Regards Dave
 
Well then a proper solution might be to simply requery the main form?
That should (re)fetch the proper information?

I believe you can reference the main form from the subform something like:
Me.Parent.CboBox = somevalue
 

Users who are viewing this thread

Back
Top Bottom