Results 1 to 3 of 3
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: other focus on new record (97 NL)

    The NewRecord property of the form is True if the current record is a new record. You can test this for example in the On Current event of the form:

    Private Sub Form_Current()
    Me.cmdSomething.Enabled = Not Me.NewRecord
    If Me.Newrecord Then
    Me.Detail.BackColor = vbWindowBackground
    Else
    Me.Detail.BackColor = vbButtonFace
    End If
    End Sub

  2. #2
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Amersfoort, Utrecht, Netherlands
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    other focus on new record (97 NL)

    Hello all,

    Is it posible when working in a form to detect if the currecr record is a new or an existing record?
    I want to change some attributes depending of the status.

    (e.g. if the record is new then the word ADD is shown else the word EDIT is shown on the form)

    Thanks for your reply.

  3. #3
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Amersfoort, Utrecht, Netherlands
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: other focus on new record (97 NL)

    As always,

    Thanks Hans for the quick answer
    It works great.

Posting Permissions

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