Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2004
    Posts
    36

    Unanswered: Combobox problem

    I have a combobox that has a rowsource based on two fields, ItemCode and ItemDesc, in respective order. The combobox has its Limit to List property set to Yes and its bound to ItemCode. Filling up the combobox will fill up other fields such as UnitPrice and UOM.

    The problem that I face is when users choose an item in the combobox and ItemCode is appearing in the box. I would want the ItemDesc to appear on the box instead of the ItemCode. Not sure if I have explained this well and so I attached a db for you guys to try it out. Any help will be deeply and greatly appreciated! Thanks to all!

    Regards,
    Swee
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Hope that is what you wish....
    Attached Files Attached Files

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    set column widths to: 0";1"
    oh yeah... documentation... I have heard of that.

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

  4. #4
    Join Date
    Aug 2004
    Posts
    36
    Quote Originally Posted by hammbakka
    Hope that is what you wish....
    Thanks so much! I think I have got it. I have 2 questions though. Will using storing ItemDesc prove to be a problem in future? All along, I have been storing numerals such as ItemCode as they are more unique. The next question is do you have an idea how to generate fields in the format IC0000001, IC0000002? I can get the last numeral by using the DMax() function but I don't know how can I lengthen the string by adding zeroes before it.

    The reason for adding the zeroes is to cater for the many items in the tables. Any suggestions?

  5. #5
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Use
    format ("IC","@00000000"& i) which i will be increased everytime by one or what ever you want

  6. #6
    Join Date
    Oct 2004
    Posts
    86

  7. #7
    Join Date
    Aug 2004
    Posts
    36
    I see. However, format only changes the way its displayed. Can I start counting from 000001, instead of just one numeral, i.e. 1? I want my ItemCode to be stored in this way IC000001 instead of IC1. The zeros are all numerals and not part of a string. This is because when there r ten items, the itemcode will be IC000010.

Posting Permissions

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