E
Emma
I have tried a couple of methods to get these forms linked together. I
finally got the subform to be updateable but I still can't seem to get it
linked to my main form via the Job_ID. I have a presentation on this due
tomorrow. . . . God help me!!
This is the code I have on my main form option button that is supposed to
open one of two subforms (thus far). In case 1: I tried to link via a bound
text box. In case 2 I tried to link via the openArgs. Neither of them works.
Select Case Form_Tbl_Master_Jobs!Frame_Contract_Type
MyOpenArgs=Me!cbo_Account_No&"-"&Me!Job_ID
Case 1
DoCmd.OpenForm "frm_tbl_contracts_Int", acNormal, , Me!Job_ID =
frm_tbl_Contracts_Int.txt_Job_ID, acFormAdd, acWindowNormal
Case 2
DoCmd.OpenForm "frm_tbl_contracts_Biopsy", acNormal, , , acFormEdit,
acWindowNormal, MyOpenArgs
Case Else
DoCmd.GoToControl "comments"
End Select
End Sub
In Case 1 I get an "Object required" error. What am I doing wrong?
The code for Case 2 in my linked form is as follows:
Me!txt_Job_ID=split(MyOpenArgs)(1)
Me!txt_Account_No = Format(split(OpenArgs, "-")(0),"00000")
I am not getting any data in the txt_Account_No field or the txt_Job_ID field.
What I need is for the Job_ID and the cbo_Account_No field data to come over
to a new record in the linked frm_tbl_contracts_Int!txt_Job_ID and the
frm_tbl_contracts_Int!txt_Account_No.
finally got the subform to be updateable but I still can't seem to get it
linked to my main form via the Job_ID. I have a presentation on this due
tomorrow. . . . God help me!!
This is the code I have on my main form option button that is supposed to
open one of two subforms (thus far). In case 1: I tried to link via a bound
text box. In case 2 I tried to link via the openArgs. Neither of them works.
Select Case Form_Tbl_Master_Jobs!Frame_Contract_Type
MyOpenArgs=Me!cbo_Account_No&"-"&Me!Job_ID
Case 1
DoCmd.OpenForm "frm_tbl_contracts_Int", acNormal, , Me!Job_ID =
frm_tbl_Contracts_Int.txt_Job_ID, acFormAdd, acWindowNormal
Case 2
DoCmd.OpenForm "frm_tbl_contracts_Biopsy", acNormal, , , acFormEdit,
acWindowNormal, MyOpenArgs
Case Else
DoCmd.GoToControl "comments"
End Select
End Sub
In Case 1 I get an "Object required" error. What am I doing wrong?
The code for Case 2 in my linked form is as follows:
Me!txt_Job_ID=split(MyOpenArgs)(1)
Me!txt_Account_No = Format(split(OpenArgs, "-")(0),"00000")
I am not getting any data in the txt_Account_No field or the txt_Job_ID field.
What I need is for the Job_ID and the cbo_Account_No field data to come over
to a new record in the linked frm_tbl_contracts_Int!txt_Job_ID and the
frm_tbl_contracts_Int!txt_Account_No.