K
Kimberley523
I have a main form, frmClaim_Initial_Entry and a subform
sfrmClaimInfo_InitialEntrysubform. If the Insured Address is the same as the
loss location address, I want to copy the contents of the 4 insured address
fields from the main to the subform. I am testing with just one field and
will apply to the others once I have this working.
The name of the subform control in the main form is actually
sfrmClaimInfo_InitialSub, which I have tried unsuccessfully to use below.
I've tried the following code:
Forms!frmClaim_Initial_Entry!Insured_Address.SetFocus
DoCmd.RunCommand acCmdCopy
DoCmd.GoToControl Forms!frmClaim_Initial_Entry!sfrmClaimInfo_InitialSub.Form.
LossLocationStreet
DoCmd.RunCommand acCmdPaste
This gives me an error of:
Method 'Form' of object '_subform' failed
I have also tried the following:
Forms!frmClaim_Initial_Entry!sfrmClaimInfo_InitialSub.Form.
LossLocationStreet = _
Forms!frmClaim_Initial_Entry!Insured_Address
and I receive the same error message above.
Any assistance is SO welcome. If there is an easier way to do this, that
would be appreciated as well. Thanks in advance for your help.
sfrmClaimInfo_InitialEntrysubform. If the Insured Address is the same as the
loss location address, I want to copy the contents of the 4 insured address
fields from the main to the subform. I am testing with just one field and
will apply to the others once I have this working.
The name of the subform control in the main form is actually
sfrmClaimInfo_InitialSub, which I have tried unsuccessfully to use below.
I've tried the following code:
Forms!frmClaim_Initial_Entry!Insured_Address.SetFocus
DoCmd.RunCommand acCmdCopy
DoCmd.GoToControl Forms!frmClaim_Initial_Entry!sfrmClaimInfo_InitialSub.Form.
LossLocationStreet
DoCmd.RunCommand acCmdPaste
This gives me an error of:
Method 'Form' of object '_subform' failed
I have also tried the following:
Forms!frmClaim_Initial_Entry!sfrmClaimInfo_InitialSub.Form.
LossLocationStreet = _
Forms!frmClaim_Initial_Entry!Insured_Address
and I receive the same error message above.
Any assistance is SO welcome. If there is an easier way to do this, that
would be appreciated as well. Thanks in advance for your help.