Page 1 of 6 123456 LastLast
Results 1 to 15 of 78
  1. #1
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60

    Question Stumped, need help. Access 2007 Requiring Data in a form

    So I am finally ready to get my new data base online (to track work updates) and my boss wanted another feature added, which was a way to be able to edit previous updates made by other people based upon the project being worked on. To that end I built another form fed by a query that would pull up the entries in a continuous form format, based upon the project selected from a list box. This data consists of 3 fields of text, a date field, and an identifier for the individual that made the entry.

    The first problem I ran into was that if I opened up the form and did nothing with it, a blank entry would be made in my table where all of the update data is being stored. To fix that I made a macro that would make sure that the fields have data in them ([field X] Is Null then Cancel Event), set on the Event "Before Update".

    But this led to another inter-related problem, which was that in the continuous form format of the data, the form always displays a blank entry at the bottom. For example, if there were two other entries made on that project, there would be blocks of data; two filled with the information and one blank. Without the Macro, If I didn't type anything in that bottom (empty) entry, it would save a blank record to my table. With the Macro, it wont let me even edit the data because there is a blank field.

    Question: is there a better way to go about this? I am by no means an expert in Access but I would call myself an intermediate user. But I just cant think of a better way, which has got me stumped.

    Thanks for your help!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm not very savvy on Macros but a form in continuous view mode will *not* create another record unless you Dirty it in some way.

  3. #3
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    Quote Originally Posted by RuralGuy View Post
    I'm not very savvy on Macros but a form in continuous view mode will *not* create another record unless you Dirty it in some way.
    This whole thing is making my brain Dirty. 9-(

    Maybe let me explain what is happening a little better (without the Required data entry Macro) in my Edit form. For example, lets say that I have two other entries for a project. I go to my "Edit Update" form and select the Project from a list menu. I have a query set that when the Project is selected, it displays all of the entries within the last month for that project. This is on a Sub-form with the Default View - Continuous Forms. This method displays all of the entries of data, and then a blank entry at the bottom. If I change the data in one of the entries and hit my Save Record button, it saves the changed data to my Table, but it also saves that blank entry. I dont know how I could have possibly "dirtied" this, or how to fix it. 9-(

    Any suggestions?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You do know that Access *will* save changes to a table without and help from you, right? You have to go way out of your way to keep the changes from being saved.

  5. #5
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    What can I say, more than I have already stated.

    The problem is with my Edit Updates function. If there is a way to stop that blank entry from coming up, I would really appreciate the help.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What do you have behind the Save Record button?

  7. #7
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    Quote Originally Posted by RuralGuy View Post
    What do you have behind the Save Record button?
    Button - Command Button Wizard - Record Operations - Save Record

    Thanks for the help.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Any chance you could post the db? Compact and Repair, remove any sensitive data, Zip it up and attach to a post.

  9. #9
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    Wish I could, the whole thing is on a secure network. 9-(

    I can pretty much explain every aspect of the db. Set of tables that layout Division-Branch-Mission-Project and then another table where I store all of the Status Updates. I have a Form for submitting new entries and now one for editing previously entered entries.

    I havent been able to find any help from the people where I work as no one knows Access better than me (kind of sad, really). So I have relied on this forum for a lot of my questions.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about making a change to one of the records and just exit the form *without* pushing the Save Record button?

  11. #11
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    Quote Originally Posted by RuralGuy View Post
    How about making a change to one of the records and just exit the form *without* pushing the Save Record button?
    It still saves the change, as well as another blank entry.

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    There is something in code or a macro that is dirtying the SubForm. Look at the SubForm by itself and see if you have something in the OnCorrent Event maybe.

  13. #13
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    Sorry to sneak in. Ruralguy is already helping you. Can you do a simple test ? Open the form with "Allow additions" set to No.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    @amrut: FYI...I knew that "allow additions" was causing the blank record but it should not be saved unless it is dirtied.

  15. #15
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    Quote Originally Posted by RuralGuy View Post
    There is something in code or a macro that is dirtying the SubForm. Look at the SubForm by itself and see if you have something in the OnCorrent Event maybe.
    Looking at the subform events, everything is blank except Time Interval: 0 and Key Preview: No, both of which I am pretty sure are irrelevant to my problem 9-)

Page 1 of 6 123456 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 10-28-2012, 02:54 PM
  2. Data not appearing on the table in Access 2007
    By Nashskye13 in forum Access
    Replies: 2
    Last Post: 10-26-2012, 02:41 PM
  3. I'm stumped with learning VBA in Access
    By phineas629 in forum Programming
    Replies: 2
    Last Post: 01-06-2012, 04:57 PM
  4. SQL Server Requiring Multiple Logins
    By dbigel in forum SQL Server
    Replies: 0
    Last Post: 11-10-2011, 09:59 AM
  5. Too much data for Access 2007????
    By pdmc1 in forum Queries
    Replies: 3
    Last Post: 06-23-2011, 01:16 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