Results 1 to 2 of 2
  1. #1
    gcowles is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    1

    Stopping empty data rows from generating when navigating between forms

    I am working on a database to help with tasks and inventory to be ordered. I basically have a form where a user can add a new entry, which then moves the item to a list in another form. Once there, the item needs to be checked as complete before moving to a datasheet view form. I have 3 forms for tasks and 3 forms for inventory, both working the same way. The problem I am having is that when click in one of the text boxes of the new entry form and type something in, then delete the text and move to another form, the item gets submitted as a new blank item. I tried making the form require a value in order to submit, but then the user can not navigate to a new form because it requires data to be entered.

    So, in short how can I allow a user to type in the box and delete their text, if they chose not to submit an entry, and not have a blank item added to the database?

    Thanks!

  2. #2
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    From what I can gather, your approach seems kind of strange. Six forms for two functions instead of 2 forms? Going to another form to determine if the record is complete instead of enforcing that from the initial form? When user leaves the record (by clicking on the form background or a form close button, you commit the record. You get a blank record for 2 reasons: a)you don't have any validation rules, either at the table level or form level that prevents a blank record, such as having at least one field that is required. b)you don't test for fields that do not pass validation and don't provide a means to cancel edits. BTW, even all-blank controls qualify as an edit if they've been typed in then erased.

    Without knowing more about the process, I can't say for sure what I think the best option is at the moment - either form level validation with close and/or cancel buttons or just table level validation rules. The part that throws me is why you need another form to 'complete' a record. Perhaps you could explain more of the setup and process.
    Edit: one suggestion anyway that you might be able to use on your own. Me.Undo will cancel a record edit if you use it in some procedure that traps for empty but edited controls.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Navigating between Forms
    By jmitchelldueck in forum Forms
    Replies: 6
    Last Post: 08-05-2015, 02:44 PM
  2. Replies: 2
    Last Post: 11-14-2013, 06:04 PM
  3. Blank forms without tables, import
    By Deans_destiny in forum Forms
    Replies: 1
    Last Post: 12-20-2011, 01:51 PM
  4. Newbie: Forms always blank
    By jimmonator in forum Forms
    Replies: 2
    Last Post: 03-24-2011, 11:56 AM
  5. Help record navigating in forms
    By edo in forum Forms
    Replies: 0
    Last Post: 08-12-2008, 10:45 AM

Tags for this Thread

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