Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Dec 2002
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    open forms (2003)

    Is there a way that when you open a form it will go to add a new record right way. When someone opens the form to add a record they are overriding the first entry because they are not clicking on the >* . We put a macro button "Click on ADD NEW RECORD first before typing" in big letters and some people are still just typing over the old entry. If the form would just open in a add new record mode it would be great

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: open forms (2003)

    In the open event of the form use the following code:

    Private Sub Form_Open(Cancel As Integer)
    DoCmd.GoToRecord , , acNewRec
    End Sub
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

  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: open forms (2003)

    Here's something else you might want to consider. I often create a transparent command button in the detail section and set its Tab Index property to 0. This way, whenever a record is displayed, focus goes to this control (and not to the usual first control which is often the Name). So if the user accidentally starts typing, nothing happens.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: open forms (2003)

    Do you only ever use this form for adding new records?

    If just set the Data Entry property of the form to Yes (found on the Data page pf the properties box).

    Otherwise, how do you open the form? Do you have a command button that runs a macro or some code?
    If it is a macro, then you can put Add into the Data Mode argument of the macro, for the form to be opened at a new record.
    the same thing can be done with code.
    Regards
    John



Posting Permissions

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