Results 1 to 7 of 7
  1. #1
    Lounger
    Join Date
    Feb 2003
    Location
    Southampton, U.K.
    Posts
    30
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Problems with Combo box after conversion (97)

    I have an intriguing problem on an Access 97 database.

    We have two fields in this database, BankCode and BankAccount so that an operator, instead of typing in the full 8-digit Bank Account number, merely selects a 2-character code from a combo box and the correct Account number is then stored.

    Previously the Bank Codes were 01 to 99, but I have just been asked to amend this so that it is an alpha-numeric field, and will accept, for example, W1, W2. There were no problems in the change to a 2-character alpha-numeric, and we manually changed codes 1 to 9 to 01 to 09.

    The problem we are now getting is that, if the operator selects any code from 01 to 09 from the combo box, it automatically re-sets to 01. The interesting thing is that, if you enter any other 2-digit combination (10, 26, W1). The program accepts what has been entered (provided it is in the table of course), and allocates the correct Bank Account number

    For the time being, this is not desperate since 01

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Problems with Combo box after conversion (97)

    Can you give some more details?
    <UL><LI>I suppose that BanckCode and BankAccount are fields in an auxiliary lookup table that is used as Row Source for a combo box in a main table or form.
    <LI>If this is correct:
    <UL><LI>What is the Primary Key of the auxiliary table?
    <LI>What field do you have in the main table to store the bank account (name, type, size)?
    <LI>Have you established a relationship between the main and auxiliary tables, and if so, on which field?
    <LI>Do you use code to store the bank account, and if so, what code?[/list]<LI>Otherwise:
    <UL><LI>Where do the BankCode and BankAccount fields reside?
    <LI>How do you use these fields?
    <LI>Do you use code to store the bank account, and if so, what code?[/list][/list]If you have other relevant information, please post that too.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Problems with Combo box after conversion (97)

    Do you have any code in the combo box's AfterUpdate event? How many columns does the combo box have? That is, is that 2-digit code the only column (whether visible or not), and is it the bound column?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Problems with Combo box after conversion (97)

    The only time I"ve seen this kind of misbehavior in a combobox is when the items in the first column did not point to unique records in the rowsource. Then the control would "reset" itself to the first item that shared records.
    Charlotte

  5. #5
    Lounger
    Join Date
    Feb 2003
    Location
    Southampton, U.K.
    Posts
    30
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Problems with Combo box after conversion (97)

    Well, thanks, everyone, for looking at this problem. Let

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Problems with Combo box after conversion (97)

    I would think that you only need the BankCode field in tblCopyChequesInput and tblCopyChequesArchive; you can look up the corresponding BankAccount field in tblBankAccount. If you have both fields in all tables, you create redundant information. The first column (corresponding to BankCode) should be the bound column in te combo boxes in that case.

    When you changed BankCode from numeric to text in tblBankAccount, did you change the field type in tblCopyChequesInput and tblCopyChequesArchive too? And did you change 1 to 01 etc. in all records in all tables, manually or (better) through cascading updates? (Hmm, you wrote that you don't have records with bank code 01 through 09 yet so that shouldn't be a problem <img src=/S/hmmn.gif border=0 alt=hmmn width=15 height=15>)

  7. #7
    Lounger
    Join Date
    Feb 2003
    Location
    Southampton, U.K.
    Posts
    30
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Problems with Combo box after conversion (97)

    Hans :

    Yes, thanks, I take the point. In fact, the field fldBanCode in the table tblCopyChequesArchive is in fact empty - it's only fldBankccount that gets updated (in fact that's all that is needed in there). The field fldBankAccount in tblBankAccounts is only there because traditionally all of our bank accounts (as a Local Authority we have many) are referred to by a two-character code ; this is obviously less prone to error when *anybody* may be doing the input than typing in the full 8-digit Bank Code.

    For our purposes, however (we are the Banking and Control Section) it is necessary to quote the full and correct account number to the bank - since whilst a Bank Account/Cheque No combination is unique, the same cheque no may appear for each Bank Account at some time. In fact, the Bank Code, although there is a field for it, is not recorded.

    My real headache though is WHY is it that, when you type 02, 03, 04 etc in the combo box does it only recognise that as 01, or at least converts it to 01, yet if you type in 10, 25, W1, 73, etc., it accepts those combinations without difficulty ? - also, why do I have the oproblem now, when it has worked fine (for over 3 years) when it was a numeric field ?

    As a matter of interest, I have just typed in 00 (which is a valid input) and it accepts that !! Just won't accept 02, 03, 04, 05, 06, 07, or 08 (09 doesn't exist) - replaces all of them with 01 !!

Posting Permissions

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