Results 1 to 2 of 2
  1. #1

    Val Function in queries

    I was wondering if there's a way to use the Val function in a query.

    I have been messing around for a while and was wondering if it's even possible.

    I want to return an ID number from a field that's a combo box. The ID number is hidden in the combo box (Column Width = 0), but two other fields are not.



  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: Val Function in queries

    Yes, you can use Val() and other functions in a query. What are you trying to do with it?

    There are no comboboxes in queries, so I assume you want to refer to the value in a combobox on an open form, right? If the ID number is in the bound column of the combobox, then all you have to do is reference the combobox value to get the ID number. If that isn't the bound column, you can refer to it by its column index, i.e., Forms!MyForm!MyCombo.Column(0). Does that answer that part of your question?

Posting Permissions

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