+ Reply to Thread
Results 1 to 4 of 4

Can't get this form blank by default

  1. #1
    Registered User
    Join Date
    08-29-2011
    Location
    Minnesota
    MS-Off Ver
    Excel 2013
    Posts
    95

    Can't get this form blank by default

    I am trying to figure out forms for the first time today, and I had an issue where the form would always default with data already populated in the form entry fields with existing data from the table when you opened the form. Google helped me figure out how to solve that problem on my test database.

    I went to my established database to try to create some forms, and I'm having the same issue with the form auto-populating the input fields with existing data from the table. I tried to fix this using the same steps as before, and the things it's telling me to look for and do are not available. The only difference between the two databases I noticed was that the fix worked on a brand new table, but not on an already established table. Here are the steps that worked on the new table, and where I'm having issues with the established table.

    First off, go to the your form's properties and make sure the "Allow Additions" is set to "Yes".

    Now go into your VBA code and in your Sub Form_Load() add the following statement:

    DoCmd.GoToRecord , , acNewRec

    This will open your form to a new/blank record.

    Hope this helps!
    Problems:

    1: I don't see the option for "Allow Additions" in the form properties for the established database / report.
    2: When I Alt F-11 for VBA, there's nothing there at all. I can insert a module, and then it's literally the only thing in VBA for this database. I inserted that code into a new module, but the form still opens with data.

    Google has been unable to help me fix this issue. Are any of you fine individuals willing and able to help me fix this?

    Thanks for your time!

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    9,035

    Re: Can't get this form blank by default

    I am by far not an expert in Access, but I think I can help.

    Open your form and then open the Property Sheet. Under the Data tab you will find Allow Additions. It's the tenth option down on the Data tab.

    As for the code, still in the Property Sheet for the form, select the Event tab. Drirectly to the left of the On Load option, click on the ellipses and then Code Builder, OK.

    Now you will see the code sheet in VBA and a procedure...

    Please Login or Register  to view this content.
    Hope this helps.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    08-29-2011
    Location
    Minnesota
    MS-Off Ver
    Excel 2013
    Posts
    95

    Re: Can't get this form blank by default

    Ah yes - that worked! Thank you! The fix was the code builder on the "On Load" option.

    The issue with not finding Allow Additions is that I was looking at the properties of the entry field as opposed to the report as a whole I think. I did not have allow additions when the field was highlighted, but did have it when I clicked in the gray area outside of any field. Excellent! It was already set to "Yes", but that explains why I couldn't find it.

    Thanks again Jeff!

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    9,035

    Re: Can't get this form blank by default

    Awesome. That's good to know and thanks for the feedback and rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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