Unanswered: Using the value of a combo box's 3rd column in SQL criteria
I want to make a query that adds a new delivery to tblDeliveries that runs from frmNewDelivery when cmdOK is clicked. Everything passes through it fine except for one part of the criteria:
I have a combo box that allows the user to select their type of van. It has the columns MakeModel, Size, VanID respectively. So once the user has selected their van, it shows the MakeModel in the collapsed combo box. I would like to add the value of cboTypeOfVan.Column(2) in my criteria, however, it seems when I try this, it's not acceptable, only cboTypeOfVan, which would give the value of MakeModel and not the VanID.
I don't want to change the headers around otherwise when user selects van, it'll show the VanID which isn't useful for the user.
I am also trying to avoid using hidden textboxes on the form.
Is their any other way that this can be achieved?? Perhaps calling a variable or something?