Consulting

Results 1 to 3 of 3

Thread: Autonumber field

  1. #1
    VBAX Regular
    Joined
    Nov 2012
    Posts
    16
    Location

    Question Autonumber field

    I have a field called [Loan_No] in a table. The [Loan_No]'s format is autonumber.

    I have another field called [CP_No].

    The [CP_No]'s value should be something like "PMB/Loan_No".

    How can I derive the [CP_No] value if i need the [Loan_No] as part of its value??

    Please assist.

  2. #2
    VBAX Regular
    Joined
    Feb 2011
    Posts
    27
    Location
    Until the new record is updated or saved, the autonumber field has a null value. So your function may lead to division-by-zero errors.

    I recommend PMB/NZ([Loan_No],1)

    The immediate result will be innaccurate, but will fix itself after the table or record has been refreshed.

    you can put docmd.refresh page in the "after insert" event of the form to be certain of the update.

    The NZ funtion is only available in Access. If you are working with other programs, you may have to use the iif function instead instead.

  3. #3
    VBAX Regular
    Joined
    Nov 2012
    Posts
    16
    Location
    Quote Originally Posted by jrajul
    Until the new record is updated or saved, the autonumber field has a null value. So your function may lead to division-by-zero errors.

    I recommend PMB/NZ([Loan_No],1)

    The immediate result will be innaccurate, but will fix itself after the table or record has been refreshed.

    you can put docmd.refresh page in the "after insert" event of the form to be certain of the update.

    The NZ funtion is only available in Access. If you are working with other programs, you may have to use the iif function instead instead.
    I have solved the problem. thanks for your advice anyway

Posting Permissions

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