Results 1 to 2 of 2
  1. #1
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727

    clear form

    Hi All, Using a form to edit detail in a subform in Access 2003. When the users open the form; the fields are populated with previous data. The form has a recordsource of a table and the subform has a recordsource of a query. The users select invoice number from a unbound field on the main form which loads applicable data in the subform. I put a clear button on the main form to clear the fields but it gives me errors about how I cant change the record because it would cause duplicates. How do I clear the fields when the users exit the form without getting errors.
    Thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    Why would you need to clear on exit?

    The fields are populated with previous data because the form and controls are bound. You can't 'clear' the fields/controls if the controls are bound to the fields. That would be deleting data.

    What you can do is move to a new record or open form only to new record by setting DataEntry Yes.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Clear Form
    By hithere in forum Access
    Replies: 4
    Last Post: 03-28-2012, 09:28 AM
  2. How to clear form each time
    By JackieEVSC in forum Forms
    Replies: 1
    Last Post: 10-28-2011, 12:20 PM
  3. How to clear a search form ?
    By Trojnfn in forum Access
    Replies: 2
    Last Post: 10-05-2011, 01:12 PM
  4. Form Fields Clear
    By rajulasb in forum Access
    Replies: 1
    Last Post: 08-06-2011, 01:11 AM
  5. How to clear the form?
    By Mrcams in forum Access
    Replies: 3
    Last Post: 01-03-2011, 12:15 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