I have a main form that has one field which looks up data in a subform. The data in the subform will be accessed by users that will either want to enter a new record (in the subform) or replicated the record's date (also in the subform).
How do I do this? Here was the code I am working with...I know it works within the main form, but I can't figure how to reference the subform's fields as those to be replicated.
Code:
Private Sub cmdReplicate_Click()
On Error GoTo Err_cmdReplicate_Click
Dim Build, TargetedRelease As Variant
Build = Me![Build]
TargetedRelease = Me![TargetedRelease]
DoCmd.GoToRecord , , acNewRec
Me![Build] = Build
Me![TargetedRelease] = TargetedRelease
Exit_cmdReplicate_Click:
Exit Sub
Err_cmdReplicate_Click:
MsgBox Err.Description
Resume Exit_cmdReplicate_Click
End Sub
Although there are similar issues, I cannot get my code to do what I want...hopefully you can help.
Please let me know what you think.
Thank you in advance.
- Ben
How do I do this? Here was the code I am working with...I know it works within the main form, but I can't figure how to reference the subform's fields as those to be replicated.
Code:
Private Sub cmdReplicate_Click()
On Error GoTo Err_cmdReplicate_Click
Dim Build, TargetedRelease As Variant
Build = Me![Build]
TargetedRelease = Me![TargetedRelease]
DoCmd.GoToRecord , , acNewRec
Me![Build] = Build
Me![TargetedRelease] = TargetedRelease
Exit_cmdReplicate_Click:
Exit Sub
Err_cmdReplicate_Click:
MsgBox Err.Description
Resume Exit_cmdReplicate_Click
End Sub
Although there are similar issues, I cannot get my code to do what I want...hopefully you can help.
Please let me know what you think.
Thank you in advance.
- Ben