Page 1 of 4 123 ... LastLast
Results 1 to 15 of 47

Thread: Combo Box Woes

  1. #1
    Join Date
    Sep 2003
    Posts
    67

    Unanswered: Combo Box Woes

    Having problems with two (seemingly) simple combo boxes.

    1. I have a table named Months that lists Jan-Dec in a field set as Text. I created a combo box on a form to allow the selection of a month. Easy, right? But when the month is selected, an error message refuses to allow the selection because of field type inconsistency (it thinks I'm trying to enter text in a number field). I've double-checked; the field type is Text.

    2. I have another form on which I'd like to allow the selection of a maximum of 5 out of 9 "competencies" (Analysis, Communication, etc.) The underlying table has fields named Comp1, Comp2, ... Comp5. I thought I could create 5 combo boxes, allowing the choice of one each, and have the data from each stored in its corresponding field. But I thought wrong. Using the wizard, Comp1 works OK, but the remaining fields are not listed in the "store value in this field" list. What's up with that??

    I promise I've done stuff more complex that this (amateur though I am); I don't know why these two have me stumped.

    Thanks in advance for any assistance.

    Jaycee
    Last edited by Jaycee; 10-24-03 at 11:54.

  2. #2
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb Pointers...no time to code sorry!

    Problem 1

    i) Add a primary key to the table with the month names
    ii) Create a combo box based on this table with

    columncount : 2
    column widths : 0cm;4cm

    ...change the 4cm to whatever - the 0 means that the autonumber will not be shown in the dropdown

    this should solve Problem 1

    Problem 2

    How about a multi-select list box instead?

    Create a list box - go to the "Other" tab set the multi-select
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  3. #3
    Join Date
    Sep 2003
    Posts
    67

    Re: Pointers...no time to code sorry!

    Prob 1: Added the primary key; recreated the combo box as instructed. I'm still getting the error message (trying to a text to a numeric field).

    Prob 2: I'd considered a multi-select list box, but how will the selections be stored in one field (competencies?) and how will they appear in a report? I'd like to be able to create a query that would sort on or group each competency.

    One other question re combo boxes in general -- even on the boxes that work, the value stored is the ID number rather than the text. If I have 6 teams in a list, I'd like the name of the team rather than the number to be stored in the table. Is there a setting I'm missing?


    Originally posted by garethdart
    Problem 1

    i) Add a primary key to the table with the month names
    ii) Create a combo box based on this table with

    columncount : 2
    column widths : 0cm;4cm

    ...change the 4cm to whatever - the 0 means that the autonumber will not be shown in the dropdown

    this should solve Problem 1

    Problem 2

    How about a multi-select list box instead?

    Create a list box - go to the "Other" tab set the multi-select

  4. #4
    Join Date
    Sep 2003
    Location
    Faversham, UK
    Posts
    3
    hi

    I hope I don't sound patronising re: problem 1, but which column in the combo is which? If the second column is the pk and not the month field, then here is your problem. Just thought it was worth checking as the problem sounds a tad strange.

  5. #5
    Join Date
    Sep 2003
    Posts
    67
    The first column is the PK (MonthID) and the second is Month. The PK type is autonumber and the Month type is text.

    It's such a simple, simple table and I'm asking so little of it! Again, any assistance is greatly appreciated.



    Originally posted by Tay
    hi

    I hope I don't sound patronising re: problem 1, but which column in the combo is which? If the second column is the pk and not the month field, then here is your problem. Just thought it was worth checking as the problem sounds a tad strange.

  6. #6
    Join Date
    Sep 2003
    Location
    Faversham, UK
    Posts
    3
    Can you post the db - if it's large, try zipping it.

  7. #7
    Join Date
    Sep 2003
    Posts
    67
    Finally resolved Prob 1 .... any advice on Prob 2 or the question re number vs. text storage is still welcomed!


    Originally posted by Tay
    Can you post the db - if it's large, try zipping it.

  8. #8
    Join Date
    Sep 2003
    Location
    Faversham, UK
    Posts
    3
    Out of interest, how did you resolve prob 1?
    As for prob 2, could you not have a look-up table that stores the types of competencies, and then have your 5 combos based on the look-up table, but store thre results in the other table? Maybe I've missed the point - it's late, and it's Friday.....

  9. #9
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820

    Re: Combo Box Woes

    need some more info
    go into the combo box properties and tell us what each of the control sources is

    this should be a list of the 5 fields where you want to store the data

    PS
    the best bit of advise you'll ever get about access is NEVER use the wizards unless you have no choice. they do thing in the most cock-eye manor possible it's much better to do it your self
    Last edited by m.timoney; 10-24-03 at 14:27.
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  10. #10
    Join Date
    Sep 2003
    Posts
    67

    Re: Combo Box Woes

    I haven't succeeded in creating the boxes yet. I have a table named Competencies that has two fields: CompetencyID and Competency. The table is populated with a list of nine competencies.

    I have another table named TrainingDetailsSubform. It contains fields named Comp1, Comp2, Comp3, Comp4, and Comp5 (all type Text). When I attempt to create the combo boxes and have the data stored in the corresponding fields (Comp1, etc.), these fields do not appear in the list offered by the wizard.

    Where've I gone wrong with this setup?

    I'm sure you're right about wizards; unfortunately, I've no training in writing code, so I'm at their mercy.

    Thanks for your interest ...

    Jaycee



    Originally posted by m.timoney
    need some more info
    go into the combo box properties and tell us what each of the control sources is

    this should be a list of the 5 fields where you want to store the data

    PS
    the best bit of advise you'll ever get about access is NEVER use the wizards unless you have no choice. they do thing in the most cock-eye manor possible it's much better to do it your self

  11. #11
    Join Date
    Sep 2003
    Posts
    67
    Prob 1 was the result of an oversight -- as you say, it's late, it's Friday...

    On Prob 2, I can't get the wizard to show the fields in which I want to store the data, even though they exist in the table.

    Originally posted by Tay
    Out of interest, how did you resolve prob 1?
    As for prob 2, could you not have a look-up table that stores the types of competencies, and then have your 5 combos based on the look-up table, but store thre results in the other table? Maybe I've missed the point - it's late, and it's Friday.....

  12. #12
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    it would probably be best if you posted a copy of the db for us to play with

    unforchantly i've currently got 22 minute to catch a bus thats about 25 minutes walk from my current location so got to scoot
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  13. #13
    Join Date
    Sep 2003
    Posts
    67
    I'll do just that ... as soon as I get back to work. I've just begun a week of vacation and failed to bring a copy of the db home with me. I'll post it on Monday, Nov 3. Thanks much!!

    Originally posted by m.timoney
    it would probably be best if you posted a copy of the db for us to play with

    unforchantly i've currently got 22 minute to catch a bus thats about 25 minutes walk from my current location so got to scoot

  14. #14
    Join Date
    Sep 2003
    Posts
    67
    I've attached the db (.zip) as requested (created, btw, in Access XP).

    To restate my questions:

    On the Training subform, I'd like to allow the selection of a maximum of 5 out of 9 "competencies" (Analysis, Communication, etc.). The underlying table has fields named Comp1, Comp2, ... Comp5. I thought I could create 5 combo boxes, allowing the choice of one each, and have the data from each stored in its corresponding field. But I thought wrong. Using the wizard, Comp1 works OK, but the remaining fields are not listed in the "store value in this field" list.

    One other question -- I'd like the NAME of the competency to be stored instead of it's number. Having the "value" of the competencies would be useless on a report. This is a problem I have with other DBs as well. Is there a setting I'm missing?

    Thanks!


    Originally posted by m.timoney
    it would probably be best if you posted a copy of the db for us to play with

    unforchantly i've currently got 22 minute to catch a bus thats about 25 minutes walk from my current location so got to scoot

  15. #15
    Join Date
    Sep 2003
    Posts
    67

    Attachment

    Let's see if the attachment works this time ...
    Attached Files Attached Files

Posting Permissions

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