Results 1 to 10 of 10
  1. #1
    DefinitelyMaybe is offline Advanced Beginner
    Windows 10 Access 2002
    Join Date
    Dec 2020
    Posts
    65

    Not Able to Reference Row Source query after Column 1

    Hi All,

    I have a row source query that has 4 fields: Project number, Project name, Project code and Business unit. Project number is the combo box with the query and works fine. Project description is a text box that references [Query].[Column](1) and also works, but Project code and Business unit are coming up blank when using [Query].[Column](2) and [Query].[Column](3). What am I doing wrong?



    Thanks in advance,

    Eric

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi Eric

    Can you upload a copy of the Db?

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    You don't use the Query.Column syntax (queries don't have columns, they have fields) but your combo box control name; lets say you have cboProjectNumber as the combo, bound column is the first one so ProjectNumber is cboProjectNumber (no need to specify the column for the bound one or cboProjectNumber.Column(0)), ProjectName is cboProjectNumber.Column(1), ProjectCode is cboProjectNumber.Column(2)....

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    DefinitelyMaybe is offline Advanced Beginner
    Windows 10 Access 2002
    Join Date
    Dec 2020
    Posts
    65
    Hi Mike/Vlad,

    I still can't tell what I am doing is wrong... I wrote query but meant combo box. I attached the db as Mike suggested.

    Thanks,

    Eric

    PS Glad to see you both active on the site. I have been away for awhile but you both helped me tremendously when I was here a year ago!
    Attached Files Attached Files

  5. #5
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    HI Eric

    The Column Count on the Combobox was set as 1 - I changed it to 5

    I have tidied the form up but the table needs a Primary Key - Autonumber
    Attached Files Attached Files

  6. #6
    DefinitelyMaybe is offline Advanced Beginner
    Windows 10 Access 2002
    Join Date
    Dec 2020
    Posts
    65
    Thanks Mike. I knew it was going to be something to bring in more columns since the description column did come in. I didn't think to look in the Format section. Good to know!

    Cheers,

    Eric

  7. #7
    DefinitelyMaybe is offline Advanced Beginner
    Windows 10 Access 2002
    Join Date
    Dec 2020
    Posts
    65
    Hi Mike,

    Making that change did affect the dropdown for CS Proj No. Can I have the other 4 columns not show?

    Thanks,

    Eric

  8. #8
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Along with the Column Count on the Combobox, I would set the Column Widths to 1.5";0";0";0";0"


    A few other issues I see are:
    ----------------------------
    Tbl_Make_Our_Projects does not have a Primary Key field (IMHO, I think every table should have a PK field)
    Tbl_Make_Our_Projects.State/Province has a special character in the name (the "/")
    Spaces in the field names of "Tbl_Make_Our_Projects"
    "CS_Proj_No" is not set to be unique.

    "ID" is a poor field name.....

  9. #9
    DefinitelyMaybe is offline Advanced Beginner
    Windows 10 Access 2002
    Join Date
    Dec 2020
    Posts
    65
    Thanks Steve! I appreciate the other comments as well.

    Eric

  10. #10
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Hi Eric, welcome back, glad to see you solved it!

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 07-17-2021, 05:38 PM
  2. Replies: 5
    Last Post: 02-26-2018, 12:35 AM
  3. Replies: 10
    Last Post: 02-14-2018, 06:21 AM
  4. Replies: 2
    Last Post: 06-30-2016, 08:01 AM
  5. Replies: 1
    Last Post: 03-23-2012, 12:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums