Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004

    Unanswered: CountyLong Name and County Short Name

    Hello, i have database front end is Access, and backend is sql server. The front end, there are two dropbox, called 'CountyLongName', and 'CountyShortName'. I want to: when i select a countyLongName, there it will pop up the exact CountyShortName in anohter field.

    For example, when i click Howard Couty in the 'CountyLongNmae', it will automatically display "HW" in the 'CountyShortName" Field. Can you give me more detail how to do it. Thanks.

    I have counties,

    Allegany AL
    Anne Arundel AA
    Baltimore City BC
    Baltimore County BA
    Calvert CV
    Caroline CA
    Carroll CR
    Cecil CE
    Charles CH
    Dorchester DO
    Frederick FR
    Garrett GA
    Harford HA
    Howard HO
    Kent KE
    Montgomery MO
    Prince George PG
    Queen Anne QA
    Saint Mary SM
    Somerset SO
    Talbot TA
    Washington WA
    Wicomico WI
    Worcester -- WO
    Last edited by yyu; 09-01-04 at 12:11.

  2. #2
    Join Date
    Oct 2003
    Provided Answers: 1
    In the properties of the ComboBox let the number of columns be 2, in its RowSource use
    SELECT longName, shortName From yourTable Order BY shortName

  3. #3
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Use a country_id instead. You should be referencing your countries by number if you have more then one text description for them. So, use fields: country_id, long_name, short_name.

    Then for the first combo box use: SELECT country_id, long_name with columnwidths: 0";1"

    For the second combo box use: SELECT country_id, short_name with columnwidths: 0";1"

    Then in the afterupdate event for each combo box you could use something similar to this:

    YourComboBoxToBeChanged.value = YourComboBoxThatHasCurrentVAlue.value
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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