Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316

    Unanswered: Referring to a cbo Column in an Access Query

    Is this possible? I'm certain I've done it in the distant past, but I can't for the life of me remember how it was done. I've tried all sorts:

    [Forms]![frm1]![cboID].[Column1]
    [Forms]![frm1]![cboID].[Column(1)]
    [Forms]![frm1]![cboID]![Column1]
    [Forms]![frm1]![cboID]![Column(1)]

    But with no luck.

  2. #2
    Join Date
    Apr 2006
    Posts
    157
    i believe it was in a previous post

    try this
    Only quitters quit!

  3. #3
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316
    Thanks for the reply, but I'm not using my Access Query to filter a form. Also, I need to do this using an Access query directly referrencing a specific combo box column, and not in code.

  4. #4
    Join Date
    Apr 2006
    Posts
    157
    same exact thing, just use the builder to reference the combobox
    in your criteria
    Only quitters quit!

  5. #5
    Join Date
    Nov 2005
    Posts
    113
    I have the same problem as bcass when I refer in the querybuilder.

  6. #6
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    I think this is what you're looking for.

    [Forms]![frm1]![cboID].Column(1)
    Inspiration Through Fermentation

  7. #7
    Join Date
    Nov 2005
    Posts
    113
    I get Error "The Functon is not defined" I use Access 2003

  8. #8
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    441
    Eval function:

    Eval("[Forms]![frm1]![cboID].Column(1)")
    Roy-Vidar

  9. #9
    Join Date
    Sep 2002
    Location
    Mancos, CO
    Posts
    73
    whenever I have done this I only use [Forms]![frm1]![cboID] in the query. The column to use is set as the bound column in the cbo properties.

    Not sure if that is what your looking for.

  10. #10
    Join Date
    Apr 2006
    Posts
    157
    here's what I just used :

    Code:
    [Forms]![A01Frm_ViewBATT]![cmbFilth].[value]
    works fine

    and yeah, yeah, it's looking at column(0)
    so if you wish to refer to another value in your combo,
    you can just change the sequence of values in its query

    oh, btw, you can look around for a union query that would give you
    "all" as default selection for your combo

    so that when you load the form initially, you display all records.


    sorry it took so long... got busy
    Only quitters quit!

  11. #11
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    The point is, if you don't want to look at the bound value in the combo, but rather the value next to it. Then you use the Column property of the combo box. You can even treat it like an array:

    Forms]![frm1]![cboID].Column(1,2)
    would return the 3rd value down from the 2nd column of the combo box.
    (The indexes for both row and column are 0 based)

    Look at Column Property in the help file.
    Inspiration Through Fermentation

  12. #12
    Join Date
    Nov 2005
    Posts
    113
    I have still the same problem...
    Attached Files Attached Files

  13. #13
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    441
    My suggestion actually works. I'd recommend trying it.
    Roy-Vidar

  14. #14
    Join Date
    Nov 2005
    Posts
    113
    To Roy-Vidal I try and try but it doesn't works Sorry... Can you send exempel db... please....

  15. #15
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    441
    Is it the correct name, is the form open... ?
    Attached Files Attached Files
    Roy-Vidar

Posting Permissions

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