Autopopulate in Subform witih subform control

Monstermechanic

Registered User.
Local time
Today, 10:05
Joined
Jan 31, 2006
Messages
16
Having issues with auto population in a subform using a subform button control.
The code obviously works when in form mode but when as a subform object form cannot be found.

Private Sub Command13_Click()
[Forms]![VSM - Vendor Surveillance Findings]![Text29] = ("Transferred item to a VCAR for investigation, disposition, and corrective action.")
End Sub

Help:)
 
A Subform is not a member of the Forms collection. To refer to a subform you need refer to the Form property its subform control container.
Code:
Forms!FormName.SubformControlName.Form.ControlName = <data>
 
Have not worked with VBA very much.
The form name is VSM - Vendor Surveillance Discrepancy
The sub form is located in Child14
The subform name is VSM - Vendor Surveillance Findings
The datafield is Test29.

This is what I came up with and I just can't figure this one out.


Code:

Private Sub Command13_Click()

[Forms]![VSM - Vendor Surveillance Discrepancy].[child14].[VSM - Vendor Surveillance Findings].[Text29] = ("Transferred item to a VCAR for investigation, disposition, and corrective action.")
End Sub
:eek:
 
Have not worked with VBA very much.
The form name is VSM - Vendor Surveillance Discrepancy
The sub form is located in Child14
The subform name is VSM - Vendor Surveillance Findings
The datafield is Test29.

This is what I came up with and I just can't figure this one out.


Code:

Private Sub Command13_Click()

[Forms]![VSM - Vendor Surveillance Discrepancy].[child14].[VSM - Vendor Surveillance Findings].[Text29] = ("Transferred item to a VCAR for investigation, disposition, and corrective action.")
End Sub
:eek:
 
Try ...
Code:
Forms![VSM - Vendor Surveillance Discrepancy].child14.Form.Text29
 
Was on Vacation. It worked. Thank you so much.
Now I just have to re-grow my har back.
 

Users who are viewing this thread

Back
Top Bottom