educate889
Technical User
I have a main form (unbound) and a subform (bound tblMaster_cc)
The user selects a company in Combo (cmbCompanyID) which fills in some unbound "info" fields on the form. Then they are to click a button (cmdCreateComplaint) which I wanted to pass the value of the combo box to the subform field to begin the data entry.
Here is my code for the button:
Private Sub cmdCreateComplaint_Click()
[Forms]![01_Main_Prod_Complaint]![01_cc_sub].Form!txtCompany = CboCompanyID.Column(0)
End Sub
The problem is that it works only 85% of the time. Other times I get errors and function is halted.
Can someone please help! All I want it to fill in some of the values on the subform so there is less room for data entry error.
If you think I should attack it differently, I am up for suggestions.
The user selects a company in Combo (cmbCompanyID) which fills in some unbound "info" fields on the form. Then they are to click a button (cmdCreateComplaint) which I wanted to pass the value of the combo box to the subform field to begin the data entry.
Here is my code for the button:
Private Sub cmdCreateComplaint_Click()
[Forms]![01_Main_Prod_Complaint]![01_cc_sub].Form!txtCompany = CboCompanyID.Column(0)
End Sub
The problem is that it works only 85% of the time. Other times I get errors and function is halted.
Can someone please help! All I want it to fill in some of the values on the subform so there is less room for data entry error.
If you think I should attack it differently, I am up for suggestions.