Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2003
    Posts
    3

    Question Unanswered: Using Colums of a Combobox

    Hello!
    I'm trying to use the function Column() in the where condition of a OpenForm Action but i can´t put it work. Can i use this function with Queries or Tables?
    This is what i have in the where condition:

    [Query]![Combobox1].[column](2)=[Forms]![Form]![Combo2]

    Can someone help me on this?
    I'm out of ideas...

  2. #2
    Join Date
    Aug 2002
    Posts
    31
    Could you please clarify a bit what you are trying to do? Are you trying to pass the value of a column in your combo box on one form to 2nd combo box on 2nd form?

  3. #3
    Join Date
    Mar 2003
    Posts
    3
    Yes, but i need to filter the information and i'm doing it with a macro. That macro have the OpenForm Action and in the where condition i'm comparing the value from one combobox in one form with a combobox in one querie.

    Sorry about my lausy english!!!

  4. #4
    Join Date
    Jan 2003
    Posts
    46
    Ymir

    While you can refer to a combobox (as a control)in a query, you cannot refer to the combo box's column property. There is no column Function in Access

    An alternative would be to assign the value of the column() to a variable and then pass the value of the variable to a SQL statement. But this will have to all be done in VBA.

    A last caveat about using Macros. They should not be used at all. Besides lacking the power and flexibility of VBA, macros provide no debugging capabilities. Macros provide no advantages over VBA and substantial disadvantages.

    Cheers,
    Zambezibill

  5. #5
    Join Date
    Mar 2003
    Posts
    3
    Thanks... But i can´t learn VBA in one or to days
    I think i solved my problem creating a new querie.

    Maybe i will try to learn VBA sometime.

    Thank you again

  6. #6
    Join Date
    Aug 2002
    Posts
    31
    Learning bits of VBA does not take that much time, and in the long run, saves hours, both in terms of development, and more importantly, debugging. I think you will be amazed at how easy you will find it, and how much more you will accomplish quickly!

Posting Permissions

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