+ Reply to Thread
Results 1 to 4 of 4

Can't get this form blank by default

  1. #1
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Minnesota
    MS-Off Ver
    Office 365
    Posts
    163

    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
    Office 365
    Posts
    10,316

    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
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Minnesota
    MS-Off Ver
    Office 365
    Posts
    163

    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
    Office 365
    Posts
    10,316

    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)

Similar Threads

  1. [SOLVED] Does anyone know the vba behind the default data form???
    By orlando212 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-20-2014, 12:54 PM
  2. Replies: 3
    Last Post: 10-16-2013, 07:17 AM
  3. Replies: 4
    Last Post: 02-20-2012, 02:24 PM
  4. Default to View Code on Form
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2010, 06:11 PM
  5. Autonumbering the default database form
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-07-2009, 02:00 PM
  6. Data Entry Form (similar to default Excel Data>Form)
    By tonydm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-11-2005, 02:59 PM
  7. [SOLVED] Form Default Value
    By bw in forum Excel General
    Replies: 2
    Last Post: 01-07-2005, 08:06 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