G
Guest
I've tried this but get a "can't find the field 'Profile' referred to in your expression". It might be easier if I give more complete details
SubForm name: sfrmProfilesAndAssociation
Record Source: tblProfilesAndAssociation
Combo Box name: Combo1
Combo Box Control Source: AssociatedProfile
Combo Box Row Source: SELECT tblProfiles.txtProfileID, tblProfiles.Description, tblProfiles.Type FROM tblProfiles
Again, I need to be able to make a selection in the combo box and then double-click it to open a form based on the selection's Type. For example, I select something with a Type "CG" and then double-click it to open a form frmPKCorrugated
Sorry for any confusion
If the name of the form can be determined from the value of the txtType
column of the combo box, then it's not a problem. For example:
Select Case Me!cboProfile.Column(2) ' the third column
Case "CG"
DoCmd.OpenForm "Form1"
Case "FG"
DoCmd.OpenForm "Form2"
Case "BG"
DoCmd.OpenForm "Form3"
' ... and so on ...
End Select
Or, if the names of the forms are constructed from the types, you might
even do something like this:
DoCmd.OpenForm "Form" & Me!cboProfile.Column(2)
to open "FormCG", "FormFG", "FormBG", etc.
SubForm name: sfrmProfilesAndAssociation
Record Source: tblProfilesAndAssociation
Combo Box name: Combo1
Combo Box Control Source: AssociatedProfile
Combo Box Row Source: SELECT tblProfiles.txtProfileID, tblProfiles.Description, tblProfiles.Type FROM tblProfiles
Again, I need to be able to make a selection in the combo box and then double-click it to open a form based on the selection's Type. For example, I select something with a Type "CG" and then double-click it to open a form frmPKCorrugated
Sorry for any confusion
JohnLute said:Sorry - thanks for sticking with me!
TYPES of records. The primary key is txtProfileID. The different
TYPES of records are: CG, FG, BG, LA, PL, etc.
fields in the tblProfiles. I need to be able to make a selection in
the combo box and double click it to go to its form.
If the name of the form can be determined from the value of the txtType
column of the combo box, then it's not a problem. For example:
Select Case Me!cboProfile.Column(2) ' the third column
Case "CG"
DoCmd.OpenForm "Form1"
Case "FG"
DoCmd.OpenForm "Form2"
Case "BG"
DoCmd.OpenForm "Form3"
' ... and so on ...
End Select
Or, if the names of the forms are constructed from the types, you might
even do something like this:
DoCmd.OpenForm "Form" & Me!cboProfile.Column(2)
to open "FormCG", "FormFG", "FormBG", etc.