Results 1 to 6 of 6
  1. #1
    kilosierra71 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    6

    Form / Macro Question

    Good day all. Looking for some assistance please. I've got a Form created to track work. Pretty basic stuff: Who did the work, What work order# to bill it to, type of work, date done, etc etc. The entry is written to a table. Here's my problem; each time someone launches the Form to enter in a new work order ticket, the form fields, by default, are 'pre-filled' with data from the last entry. So, to prevent folks from over-writing data in the table, i'm looking for a way (Macro perhaps) to force the Form to default to the last row of the table, which is blank.

    I'm learning this as I go so the less technical the better.
    Thanks in advance.


    Kilo

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    Some people like bound forms, but I don't. I don't ever give my users direct write access to my tables. I'd create an unbound form and use an INSERT INTO query to enter in the data then clear out the controls. It will eliminate all your problems.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    And I, on the other hand, have only found one situation where and unbound form made any sense; otherwise I always use bound forms. Would setting DataEntry True suit your needs? If not, you can always move to a new record in the OnLoad event of the form.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    are you talking about going to a new record on a subform or a main form?

    if it's on a main form you can probably set the ON OPEN property of the form to:

    Docmd.gotorecord acdataform, "formname", acnewrec

    This might even work in the ON OPEN property of your subform, if it is one, except substitute the subformname for formname.

  5. #5
    kilosierra71 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    6
    Thanks all. The simple fix of setting DataEntry to True on the Form properties did the trick. Appreciate all the quick responses.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Great! Glad we could help. So that you know, DataEntry will allow you to *only* see new records that have not been saved yet. As soon as you move to a new record, the previous one is saved and will no longer be visible as long as DataEntry is True.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Question about some code in a macro
    By AudiA4_20T in forum Programming
    Replies: 2
    Last Post: 07-11-2011, 08:16 AM
  2. Macro Question
    By jo15765 in forum Access
    Replies: 6
    Last Post: 01-20-2011, 07:53 AM
  3. Replies: 0
    Last Post: 07-16-2010, 09:06 AM
  4. Macro Question
    By Desstro in forum Programming
    Replies: 1
    Last Post: 06-18-2010, 10:05 AM
  5. Question on Macro to automate file import
    By delkath in forum Access
    Replies: 4
    Last Post: 05-25-2010, 04:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums