Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Autonumber in Form (Access 97)

    When attempting to create a new record in a form, before any data is entered into the record, the autonumber field displays as (Autonumber). I would prefer that this (Autonumber) does not appear and only appears when it becomes a number. Can anyone help with this?

    Thank you.

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

    Re: Autonumber in Form (Access 97)

    The only way I can think of would be to have a calculated field on the form with a forumla in it to display the autonumber value. Use a formula something like this:

    =IIf(IsNumeric([txtOrderID]),[txtOrderID],"")

    Where txtOrderID is the name of the Autonumber control.
    Charlotte

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Indiana
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autonumber in Form (Access 97)

    You could set the visible property of the autonumber field to no. This will make the field invisible on the form. In the before_update event of the next field set the visible property to true. Assuming your autonumber field is called recid and the second field on the form is called test.

    Private Sub Test_BeforeUpdate(Cancel As Integer)
    recID.Visible = True

    End Sub

    Hope this helps

  4. #4
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autonumber in Form (Access 97)

    It worked. I was trying to do it one step instead of creating the new unbound control. Thank you.

Posting Permissions

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