Hello,
I have a navigation form for entering equipment ID's.
On this form is a combo box based on a table "EquipmentType"
e.g
1 | Pumps
2 | Vehicles
3 | Storage Tanks
Hidden on the form are 3 individual "subtype" combos
During data entry if EquipmentType = 1 then "Pumpsubtype" combo box is unhidden to allow data entry and so on for the additional combo values.
Each sub type has an individual form associated with it to enter more specific details regarding that piece of equipment.
I get an issue with my code because it cannot see the hidden combo box to check the values. "Method or data member not found" How would i go about this?
I have a navigation form for entering equipment ID's.
On this form is a combo box based on a table "EquipmentType"
e.g
1 | Pumps
2 | Vehicles
3 | Storage Tanks
Hidden on the form are 3 individual "subtype" combos
During data entry if EquipmentType = 1 then "Pumpsubtype" combo box is unhidden to allow data entry and so on for the additional combo values.
Each sub type has an individual form associated with it to enter more specific details regarding that piece of equipment.
I get an issue with my code because it cannot see the hidden combo box to check the values. "Method or data member not found" How would i go about this?
Code:
If MsgBox("Would you like to enter details for this equipment now?", vbYesNo + vbQuestion) = vbYes Then
If Me.EquipmentType.Value = 1 Then
DoCmd.OpenForm "frmReactorDetailsEdit", , , "[Equipmentid] = " & Me.EquipmentID
ElseIf Me.EquipmentType.Value = 2 Then
DoCmd.OpenForm "frmBlenderDetailsEdit", , , "[Equipmentid] = " & Me.EquipmentID
ElseIf Me.EquipmentType.Value = 3 Then
DoCmd.OpenForm "frmStorageTankDetailsEdit", , , "[Equipmentid] = " & Me.EquipmentID
ElseIf Me.EquipmentType.Value = 4 And Me.UtilitySubType.Value = 1 Then
DoCmd.OpenForm "frmBoilerDetailsEdit", , , "[Equipmentid] = " & Me.EquipmentID
ElseIf Me.EquipmentType.Value = 4 And Me.UtilitySubType.Value = 2 Then
DoCmd.OpenForm "frmCoolingTowerDetailsEdit", , , "[Equipmentid] = " & Me.EquipmentID
ElseIf Me.EquipmentType.Value = 4 And Me.UtilitySubType.Value = 3 Then
DoCmd.OpenForm "frmGeneratorDetailsEdit", , , "[Equipmentid] = " & Me.EquipmentID
ElseIf Me.EquipmentType.Value = 4 And Me.UtilitySubType.Value = 4 Then
DoCmd.OpenForm "frmWellDetailsEdit", , , "[Equipmentid] = " & Me.EquipmentID
ElseIf Me.EquipmentType.Value = 4 And Me.UtilitySubType.Value = 5 Then
DoCmd.OpenForm "frmAirCompressorDetailsEdit", , , "[Equipmentid] = " & Me.EquipmentID
End If
End If
End Sub