Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Provided Answers: 1

    Unanswered: New Record with Tab Only

    I have a simple form for journaling activities that uses a time stamp for each entry.

    But when an item is entered into a field/control a new one is automatically started. How can I set it to only start a new field/control (I'm not sure of the terminology) when pressing tab or maybe make a command button.

  2. #2
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    I see this question on a regular basis, both here and elsewhere, and for the life of me I can't figure out what the problem is!

    No new record has been created! If you close the form and go to the underlying table you'll find this to be true. Access is simply setting up the framework for next record to be entered, it is not actually creating a new record.
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Dec 2004
    Madison, WI
    I was a little confused at your thread but here's some things I "think" may help.

    In regards to your date (timestamp) field on the form, make sure the default value = Now() or = Date() - (unless you have this set in the table.) I usually don't try to "set" this upon data entry but instead rely on the default.

    Check your tab order. A lot of times the tab order can affect how things work on the form. For example, if you have it setup where the first field it goes to is actually the last field in the tab order, once you enter something (depending on how the cycle property of the form is set - ie. Current Record, Current page, etc.) will dictate if it seems like it's going to a new record once you enter a value.

    I personally like to use a command button to go to a new record. In the code, I'll have something like this:

    Watch for code which sets values of other fields once something is entered into that field. If you do this, keep in mind that new records are created with that value in the other field being populated. You can utilize commands like:
    sendkeys "{esc}" (although I usually avoid sendkeys code.)
    docmd.cancelevent manipulate when you want to "back-out" of new records created.

    Hope this helps and I understood your original post correctly. If not, could you possibly re-word it.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Feb 2009
    Provided Answers: 1
    Miss, what happens is that I have the default value of the field in the form set to, =getuser() & Format(Now()," HH:MM:SS") & ": "

    So that when the framework is set up it has the time stamp in it.

    What I did was set the form properties to Allowadditions = False and then created a command button with the following properties:
    Me.AllowAdditions = True
    DoCmd.GoToRecord , , acNewRec

    And with PK's suggestion I set the tab order and from the field it goes to the command button so the user can either click or press enter.

    Thanks the help! I sure love this forum!

Posting Permissions

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