How to reference an unbound checkbox column in a combo box in VBA (1 Viewer)

jjake

Registered User.
Local time
Today, 01:24
Joined
Oct 8, 2015
Messages
291
Hello,

I have 3 combo boxes that filter one another


Sql of last combo box
Code:
SELECT TblEquipment.EquipmentID, TblEquipment.EQUIPMENTNAME, tblPlant.PlantID, tblEquipmentType.ID, TblEquipment.PSMRMP
FROM tblEquipmentType INNER JOIN (tblPlant INNER JOIN TblEquipment ON tblPlant.PlantID = TblEquipment.PLANTNUM) ON tblEquipmentType.ID = TblEquipment.EQUIPMENTTYPE
WHERE (((tblPlant.PlantID)=[Forms]![frmWorkOrderRequestNew]![cboPlantNum]) AND ((tblEquipmentType.ID)=[Forms]![frmWorkOrderRequestNew]![cboEquipmentType]));

I have a button that when the final combo box value is selected and the button is clicked i would like to lookup if column(4) which is a checkbox is selected or not.

So for example

Code:
 If me.cboUnitID.Column(4) = True then
Open form
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:24
Joined
Aug 30, 2003
Messages
36,130
The sample code looks fine, presuming it's a Yes/No field and is the 5 field in the combo's row source. Do you get an error, or what?
 

missinglinq

AWF VIP
Local time
Today, 02:24
Joined
Jun 20, 2003
Messages
6,423
Since the Column Index is Zero-based, the Field you're referencing, with

If Me.cboUnitID.Column(4) = True Then

is PSMRMP...is that the Yes/No Field you're talking about, here?

Linq ;0)>
 

Users who are viewing this thread

Top Bottom