Results 1 to 2 of 2
  1. #1
    Desstro's Avatar
    Desstro is offline Competent Performer
    Windows XP Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    185

    Question OnClick Event submit and clear

    I would like to add a button to a form that when clicked the data entered into the form is posted to the table and then the data is cleared for additional data to be entered.



    What would that code look like?

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    Its additional work to undo what is normal in a client/server environment where bound forms are live data. But it is also a common request - particularly since people are accustomed to web sites which essentially are store/forward methods.

    You can skin the cat a couple ways; use a regular bound form so the data is being saved live - advance to a new blank record with a 'Save' button that just is a new record button. It is all a facade of course....but you would need an unsave method obviously if they don't advance which you can do....using perhaps the Undo Event of the form.

    Another way is a totally unbound form; then trigger an insert query, and clear all those fields.

    but plain ole bound forms with normal record selection is pure & simple.....I've talked quite a few clients out of the 'save' mentality.....

    hope this helps.

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

Similar Threads

  1. OLEunbound onclick event
    By thangasiva in forum Forms
    Replies: 1
    Last Post: 03-26-2015, 10:55 AM
  2. Onclick event
    By tmcrouse in forum Forms
    Replies: 3
    Last Post: 09-18-2010, 01:10 PM
  3. Clear a Field OnClick
    By eww in forum Forms
    Replies: 3
    Last Post: 08-19-2010, 01:55 PM
  4. OLEunbound onclick event
    By thangasiva in forum Access
    Replies: 1
    Last Post: 06-27-2010, 01:49 PM
  5. OnClick event
    By HotTomales in forum Forms
    Replies: 1
    Last Post: 12-24-2009, 08:10 PM

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