If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: Using the value of a combo box's 3rd column in SQL criteria

Hi.

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?