+ Reply to Thread
Results 1 to 10 of 10

Thread: Combo Box

  1. #1
    Barn Newbie Carenas is on a distinguished road Carenas's Avatar
    Join Date
    Jan 2009
    Posts
    8
    Rep Power
    4

    Combo Box

    Hi to all...

    I have a combo box were a user can select a country, the selected choice is then stored in a table...

    My problem is that in the table it only displays the CountryID number instead of the actual country name...How can I fix that?

    Thanks

  2. #2
    Lightning Master AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123's Avatar
    Join Date
    Mar 2008
    Location
    Fortress Of Solitude
    Posts
    394
    Rep Power
    7

    Hi Carenas,

    Combos are relatively straight forward to read,

    If you right click the combo and select properties, then Data Tab, you will be able to see where the data is coming from..

    In your example you will be using a row source type of

    Table/Query

    And a SELECT Row source,.

    At the moment your combo is storing the CountryID, This is correct.

    What we now need to do is make sure the Country is being returned in the SELECT Row source. If you click on the little button [...] in the row source field it will bring up the query editor. Here you will see the fields you are returning for your combo.

    You need to make sure you have 2 fields here,. CountryID and Country (in that order). . Once this is done, save and return to the combo properties.

    Go to the Format Tab and make sure Column Count = 2 and Column Widths are 0cm;5.542cm

    Notice how the first column width is "0", this is the CountryID, you do not want to show this,. but you want to store it.
    5.542cm is your Country field, change the size of this to suit.
    If i helped you, make me famous by clicking the

  3. #3
    Barn Newbie Carenas is on a distinguished road Carenas's Avatar
    Join Date
    Jan 2009
    Posts
    8
    Rep Power
    4

    Combo Box

    Hi again AOG123


    Everything is done the way you suggested (by default).. Not a problem in the form, it shows it and stores it as a Country....But as CountryID in the table for some reason...Obviously I am missing something

    Regards

  4. #4
    Barn Newbie Carenas is on a distinguished road Carenas's Avatar
    Join Date
    Jan 2009
    Posts
    8
    Rep Power
    4

    That is what I have at the moment...


    SELECT [Countries].[CountryID], [Countries].[Country] FROM [Countries] ORDER BY [Country];

    Like I said...It displays the country in the form but it saves it as a countryID in the table

    Regards

  5. #5
    Barn Newbie Carenas is on a distinguished road Carenas's Avatar
    Join Date
    Jan 2009
    Posts
    8
    Rep Power
    4

    I got it!!!!!!

    After seeing your suggestion and noticing that mine was the same by default, I check it again and again and then noticed that the Bound Column was 1...I changes to 2 and voila...

    Thanks again AOG124...

    Could you please recommend me a basic book in access (by examples)? also a similar one for Visual Basic?

    I have noticed that this site provides a huge amount of information and resources, unfortunatly some its a bit to hard to follow for me...Just started with access not long ago.

    Regards

  6. #6
    Lightning Master AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123's Avatar
    Join Date
    Mar 2008
    Location
    Fortress Of Solitude
    Posts
    394
    Rep Power
    7

    Hi, glad you got it working, although not quite as it should be, but you will learn with time and practice.

    For the moment, think about why you have a countryid field,. What is the purpose of this ID field? And how does a relational database work?

    Feel free to come back and ask these questions, but i often find its best to do a little searching to get the brain ticking. Soon everything will become clear.
    If i helped you, make me famous by clicking the

  7. #7
    Barn Newbie Carenas is on a distinguished road Carenas's Avatar
    Join Date
    Jan 2009
    Posts
    8
    Rep Power
    4

    Thanks AOG123...I really enjoy it very much...Its something totally different to what I was doing before...But love it!!

    When creating a MDE file, and use the run-time version of Access instead, is there royalties to be paid? if so, were can I get information regarding fees?

    Thanks again

  8. #8
    Lightning Master AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123's Avatar
    Join Date
    Mar 2008
    Location
    Fortress Of Solitude
    Posts
    394
    Rep Power
    7
    If i helped you, make me famous by clicking the

  9. #9
    Barn Newbie Carenas is on a distinguished road Carenas's Avatar
    Join Date
    Jan 2009
    Posts
    8
    Rep Power
    4

    Thanks very much.....

  10. #10
    Lightning Master AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123's Avatar
    Join Date
    Mar 2008
    Location
    Fortress Of Solitude
    Posts
    394
    Rep Power
    7

    Also,

    Take a look at this for database design theory,

    Relational Database Normalization Basics - Database Design Help

    And this,. Keep an eye out for posts from Don94403, he is our resident Databae schema expert here

    Database Schema Design - DeveloperBarn Forums
    If i helped you, make me famous by clicking the

+ Reply to Thread

Similar Threads

  1. triple combo ajax
    By dragon rider in forum ASP Development
    Replies: 0
    Last Post: October 16th, 2008, 05:34 PM
  2. combo maker
    By Rebelle in forum ASP Development
    Replies: 21
    Last Post: October 1st, 2008, 11:25 AM
  3. Adding ALL Button to Combo Box
    By Northernlion in forum Microsoft Access
    Replies: 3
    Last Post: July 8th, 2008, 02:03 PM
  4. Combo Box - Add Entry Not In List
    By AOG123 in forum Access Database Samples
    Replies: 0
    Last Post: June 6th, 2008, 10:35 AM
  5. Dynamic Combo Maker
    By mehere in forum ASP Code Samples
    Replies: 0
    Last Post: March 28th, 2008, 10:40 AM

Bookmarks

Posting Permissions

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

SEO by vBSEO