Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    11

    Question Unanswered: What's wrong ith this expression?

    I am designing a form with a couple of comboboxes.

    In one combobox, I have in the criteria the following to create a parameter query:

    Forms![frmInvoices]![lboProject].Column(3)

    I build this via the Query Design Grid and then when I try and run it it, I get a dialogue box stating:

    Undefined Function 'Forms![frmInvoices]![lboProject].Column' in expression.

    Can someone clarify what the error is here please.

    Regards

    Paul.
    Last edited by ricochet; 03-04-04 at 10:44.

  2. #2
    Join Date
    Nov 2003
    Posts
    267
    [Forms]![frmInvoices]![lboProject]

    And I don't know if you can specify a column (have never tried though)

    S-

  3. #3
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    11
    Originally posted by sbaxter
    [Forms]![frmInvoices]![lboProject]

    And I don't know if you can specify a column (have never tried though)

    S-
    Tried that but only brings through the bound column value which I don't want in this instance.

    If I have a combobox based on a query conisting of 6 fields and I want to pull the value out of the 4th Column for another control (in this case another combobox)...how would I do it if I can't use the .Column(x) property?

    Regards,

    Paul.

  4. #4
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    11
    Originally posted by bamablacksmith
    try setting the combo2 query criteria to [combo1].column(3). Remember that the column numbers begin at 0
    Tried that, but still no go.

    Paul.

  5. #5
    Join Date
    Feb 2004
    Posts
    6
    You cant do it that way. You need to create and save a query to be used as the rowsource for combo2. Then using the AfterUpdate event for Combo1, perform a requery on Combo2

    Private Sub combo1_AfterUpdate()
    Me.combo2.Requery
    End Sub

    Hope This Helps

  6. #6
    Join Date
    Feb 2004
    Posts
    6
    Take a look here for more details..

    http://support.microsoft.com/default...NoWebContent=1

    bama

  7. #7
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    11
    Originally posted by bamablacksmith
    Take a look here for more details..

    http://support.microsoft.com/default...NoWebContent=1

    bama
    Bama,

    Crikey! Still couldn't make it go.

    What I have done is created a dummy text box that refers to Combobox1.Column(x) and then pulled the value from the text box into Combobox2.

    Seems silly that one control cn access columns but not others?

    Thanks for the help, it's greatly appreciated. I've bookmarked the Microsoft site as I'm in the throes of teaching myself VB ATM.

    Regards,

    Paul :-)>

  8. #8
    Join Date
    Feb 2004
    Location
    Houston, Texas
    Posts
    45
    I've done this hundreds of times...
    this example works for me:

    Me.txtTestDescription.Value = Me.cboLabTestName.Column(2)

    it sets the text box to the 3 column in the combo box.
    ..rtk

  9. #9
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    11
    Originally posted by rtkracht
    I've done this hundreds of times...
    this example works for me:

    Me.txtTestDescription.Value = Me.cboLabTestName.Column(2)

    it sets the text box to the 3 column in the combo box.
    ..rtk
    RTK,

    Thanks, but my initial requirement (see first post) was to use the value in Column 3 of Combox1 directly as the paramter for Combobox2.

    My error mesage is detailed.

    Regards

    Paul.

Posting Permissions

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