Hey everyone,
I have a Form that keeps records of each Machine my company has. It contains a Tab Control with 5 tabs (pages), each containing one subform in them. In one of these pages, I have a Preventive Maintenance subform that contains records with information. One of the fields (Repairs) is a Yes/No data type that I have put an "On Click" event behind, which takes you to a new record in the next page in my tab control.
In this tab, I have a Repairs subform that I wish to populate using information filled out in the Preventative Maintenance subform. I would like the fields "Date" and "Who By" to transfer over automatically just as they are listed in the Preventive Maintenance form. I would like the "Description" field to also carry over to the Repairs subform while picking up the phrase "REPAIRS:" before the typed information.
I have decent experience with SQL statements, although VBA I do not, and this is why I am having trouble figuring this out. Any help would be great!
Here is my current code which takes me to the proper tab and generates a blank new record that I am trying to fill:
I have a Form that keeps records of each Machine my company has. It contains a Tab Control with 5 tabs (pages), each containing one subform in them. In one of these pages, I have a Preventive Maintenance subform that contains records with information. One of the fields (Repairs) is a Yes/No data type that I have put an "On Click" event behind, which takes you to a new record in the next page in my tab control.
In this tab, I have a Repairs subform that I wish to populate using information filled out in the Preventative Maintenance subform. I would like the fields "Date" and "Who By" to transfer over automatically just as they are listed in the Preventive Maintenance form. I would like the "Description" field to also carry over to the Repairs subform while picking up the phrase "REPAIRS:" before the typed information.
I have decent experience with SQL statements, although VBA I do not, and this is why I am having trouble figuring this out. Any help would be great!
Here is my current code which takes me to the proper tab and generates a blank new record that I am trying to fill:
Code:
Private Sub Repair_Click()
Forms![Machines].SetFocus
Me.Parent!TabCtl0.Pages("Repairs Tab").SetFocus
DoCmd.GoToRecord , , acNewRec
End Sub