Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2010
    Posts
    24

    Unanswered: Selecting items in Combo Box

    Hi guys,

    Have an odd problem that I can't seem to solve.

    On my switchboard I have a combo box (cmb_products) which looks up values from a field in another table (tbl_productdetails.productname)

    In the creation wizard I set the 'remember what I click' field to be a field on the Switchboard called 'SelectedItem'

    What I want to do in the long run is run queries and create reports based on what is selected in that combo box.

    The problem I'm having is that the combo box looks up the records correctly but I can't click on any of the items that it displays so nothing can be selected in the combo box.

    Any thoughts?

    David

    PS: Access 2007 (2003 compatibility mode)

  2. #2
    Join Date
    Oct 2009
    Posts
    340
    strange. I would just delete that combobox and remake it from scratch.

    www CahabaData com

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    A form's AllowEdits Property set to No will prevent selections being made in a Combobox, and this is the Default setting for this property in a Switchboard Manager generated switchboard. Could this be the problem?

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Sep 2010
    Posts
    24
    Brilliant as always!

    Cheers mate, I didn't even think to look there!

    David

  5. #5
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Glad we could help!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    Join Date
    Sep 2010
    Posts
    24
    As an addition to this (sorry!)..

    Ive built an SQL query based on what is now selected from the combo box.

    It basically pulls a record from the database based on the ID number that is stored when a record is selected in the combo box (code below)

    What it does is give me a parameter query box to manually type in the record number instead of pulling it automatically from the field in the switchboard table.

    Do you guys have any idea why?

    David

    CODE for SQL query:

    Code:
    SELECT productdetails_tbl.[Product Name & Description], productdetails_tbl.[Cleaning Contractors], productdetails_tbl.[FoH Staff], productdetails_tbl.[Maintenance Staff], productdetails_tbl.[Stage Staff], productdetails_tbl.[LX Staff], productdetails_tbl.[Frequency of Use], productdetails_tbl.Severity, productdetails_tbl.[Estimated Risk], productdetails_tbl.[Health Hazards], productdetails_tbl.Respiratory, productdetails_tbl.Hand, productdetails_tbl.Eye, productdetails_tbl.Skin, productdetails_tbl.Other, productdetails_tbl.Inhalation, productdetails_tbl.[Skin Contact], productdetails_tbl.[Eye Contact], productdetails_tbl.Ingestion, productdetails_tbl.[Personal Precautions], productdetails_tbl.[Environmental Precautions], productdetails_tbl.Disposal, productdetails_tbl.[Extinguisher to Use], productdetails_tbl.[Extinguisher not to Use], productdetails_tbl.Combustion, productdetails_tbl.[Further Action], productdetails_tbl.[Completed By], productdetails_tbl.Position, productdetails_tbl.[Date Assessed]
    FROM productdetails_tbl
    WHERE productdetails_tbl.ID=switchboard_tbl.SelectedRecord;

  7. #7
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    You get a prompt because the switchboard table isn't in the FROM clause. If it only has one record, you can add it without a join and do it the way you're doing (I don't use switchboard tables, so not sure offhand of their structure):

    FROM productdetails_tbl, switchboard_tbl
    Paul

  8. #8
    Join Date
    Sep 2010
    Posts
    24
    Brilliant as always!

    Cheers guys

Posting Permissions

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