+ Reply to Thread
Results 1 to 4 of 4

Saving a record, and clearing fields

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2013
    Posts
    75

    Saving a record, and clearing fields

    So one of my forms is to add a new record, which I can accomplish easy enough, however I was having trouble clearing the fields... at one point I went as far as to set each field to "" after I saved the record.

    The problem here is that didnt create a new record, if I wanted to add another record it would go over the first save.

    now Im using this:

    Please Login or Register  to view this content.
    is there a more elegant solution?

    Keep in mind I dont want a blank record once the person gets done writing in new records... Im not sure if creating a new record after every button click would do that.... I was worried that I would always end up with 1 blank record at the end, which on the next time entering records would mean a blank record somewhere in the middle.... but not sure if it really works that way or not.

    Anyway any help would be appreciated.
    Last edited by Trachr; 06-03-2014 at 02:09 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Saving a record, and clearing fields

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    08-21-2012
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2013
    Posts
    75

    Re: Saving a record, and clearing fields

    fixed, sorry about that

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Saving a record, and clearing fields

    If you bind your form to your table, and set the data entry line in the data tab of the form properties to NO, then you do not need a save button and every time you move to a new record, Access automatically saves the record. No need for messing with save or edit conditions. And this does not require any VBA.

    Here is a link to a tutorial on setting up databases that you might find helpful.

    http://www.accessmvp.com/strive4peace/

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Saving a workbook before clearing data with the filename.
    By frankraimondi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2013, 08:27 AM
  2. Creating dropdown list clearing blank fields
    By pauloreiss in forum Excel General
    Replies: 1
    Last Post: 06-17-2008, 03:29 PM
  3. Clearing associated dropdown fields
    By TC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-31-2006, 04:20 PM
  4. [SOLVED] clearing unlocked fields on a protected sheet
    By Dick Minter in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-01-2005, 06:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1