E
Emma
Need a little help here.
Using A2K, I have a combo box on a form that contains a list of about 20
"tasks" than can be selected on some of the tasks I am having a detail form
open up, depending on which one is selected. For example, If I select New
Contract from the combo box my "Contract Selection" should open up but it
doesn't. Instead it is going to the Case Else at the end of my select
statement, which moves the user to the next field if they select one of the
items that does not need a detail form filled out. Can someone tell me why
my select case is not working?
My select case statement is as follows:
Private Sub Job_Type_AfterUpdate()
Select Case Form_Tbl_Master_Jobs!Job_Type
Case "New Contract"
DoCmd.OpenForm Contract_Selection 'Opens form to select either Bio
or Int.
Case "Rental"
DoCmd.OpenForm frm_Rental_Detail, acNormal, Qry_Rental_Detail,
"Me!Rental_Acct_No = Frm_Tbl_Master_Jobs", acFormAdd
Case "Evaluation"
DoCmd.OpenForm frm_Eval_Detail, acNormal, Qry_Eval_Detail,
"Me!Eval_Detail_Act_No = Frm_Tbl_Master_Jobs", acFormAdd
Case Else
DoCmd.GoToControl "Rep_name"
End Select
End Sub
Thank you,
Using A2K, I have a combo box on a form that contains a list of about 20
"tasks" than can be selected on some of the tasks I am having a detail form
open up, depending on which one is selected. For example, If I select New
Contract from the combo box my "Contract Selection" should open up but it
doesn't. Instead it is going to the Case Else at the end of my select
statement, which moves the user to the next field if they select one of the
items that does not need a detail form filled out. Can someone tell me why
my select case is not working?
My select case statement is as follows:
Private Sub Job_Type_AfterUpdate()
Select Case Form_Tbl_Master_Jobs!Job_Type
Case "New Contract"
DoCmd.OpenForm Contract_Selection 'Opens form to select either Bio
or Int.
Case "Rental"
DoCmd.OpenForm frm_Rental_Detail, acNormal, Qry_Rental_Detail,
"Me!Rental_Acct_No = Frm_Tbl_Master_Jobs", acFormAdd
Case "Evaluation"
DoCmd.OpenForm frm_Eval_Detail, acNormal, Qry_Eval_Detail,
"Me!Eval_Detail_Act_No = Frm_Tbl_Master_Jobs", acFormAdd
Case Else
DoCmd.GoToControl "Rep_name"
End Select
End Sub
Thank you,