Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Location
    Brighton, UK
    Posts
    33

    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?

    Many thanks,
    Tom.

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    441
    I think that you will need usage of the Eval function

    Eval("Forms!NameOfYourFodm!cboTypeOfVan.Column(2)" )
    Roy-Vidar

  3. #3
    Join Date
    Jan 2006
    Location
    Brighton, UK
    Posts
    33
    Quote Originally Posted by RoyVidar
    I think that you will need usage of the Eval function

    Eval("Forms!NameOfYourFodm!cboTypeOfVan.Column(2)" )
    How can you cram so much knowledge into one head! Incredible

    Thank you RoyVidar, much appreciated.
    Tom.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •