• Autonumber in Form (Access 97)

    Author
    Topic
    #361439

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #546305

      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.

      • #546307

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

    • #546306

      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

    Viewing 1 reply thread
    Reply To: Autonumber in Form (Access 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: