Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Pennguin is offline Novice
    Windows 10 Office 365
    Join Date
    Dec 2020
    Location
    Pennsylvania
    Posts
    11

    Losing data when I close a form

    I created a form to load data into a table. After inputting all the data into the form, I close the form, then reopen the form. When the form is re-opened, all the data I typed in is gone. I went back to the table that the form was created on, and the data is there. However the form does show any records. How can I change this so the data remains populated with in the form at all times?

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    If you have based the form on a query, the query may be filtering the records, even to the point where it filters them all out.
    Or you are applying a filter to the form when you open it which does the same thing, so remove it. Perhaps more likely because you wrote "I went back to the table that the form was created on"
    Or you are opening the form with Data Entry property set to Yes (less likely IMO)
    Is this a single record form design or a datasheet, or a continuous form? If single, you are using the navigation control to find your added record(s)?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    Further to micron's response ---What is the recordsource of the form?
    If the form is bound, then when you reopen the form you should see a record (if form is single) or all records( if form is continuous).
    I think we need more info to pin point any issue(s).

  4. #4
    Pennguin is offline Novice
    Windows 10 Office 365
    Join Date
    Dec 2020
    Location
    Pennsylvania
    Posts
    11
    The form is created based on three tables all connected properly through relationships. There is no query involved. Click image for larger version. 

Name:	Form 1.jpg 
Views:	22 
Size:	188.5 KB 
ID:	43746Click image for larger version. 

Name:	Form 3.jpg 
Views:	22 
Size:	178.2 KB 
ID:	43747Click image for larger version. 

Name:	personnel table.jpg 
Views:	22 
Size:	191.4 KB 
ID:	43748Attached are screen shots of my progress. In Form 1 you can see the data has been added to the form. In Form 3, the data is no longer in the form, after I close the form and re-open the form. In Personnel Table (view), you can see all the data is in the table, just not populating the form view.

    The data needs to remain in the form view. My client needs to access the data from the form view.

    As far as I know there are no filters flagged to clear this form upon closure of the form. If that may be the case, how do I check that?

  5. #5
    Pennguin is offline Novice
    Windows 10 Office 365
    Join Date
    Dec 2020
    Location
    Pennsylvania
    Posts
    11
    Record source of the form is the following tables:

    NCR_Personnel
    NCR_Schedule_Availabilty
    NCD_Employment_Jobs

    All tables are connected via PK as EmployeeNumber (Auto numbered)

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    Data is stored in tables. Forms are basically a window onto data stored in tables.

    The data needs to remain in the form view. My client needs to access the data from the form view.
    Then he/she must open the form with some defined recordsource (table or query).

  7. #7
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,706
    Looks to me like property Data Entry = YES is the culprit.
    Need more info if not.


    Click image for larger version. 

Name:	DEYES.png 
Views:	23 
Size:	188.5 KB 
ID:	43749

  8. #8
    Pennguin is offline Novice
    Windows 10 Office 365
    Join Date
    Dec 2020
    Location
    Pennsylvania
    Posts
    11
    Where can I find this flag at?

    And if I switch the flag to NO will that forbid me from adding more employees in the future?

    In MS Access 2003 you could build a form based on an existing table or query and not have this problem at all. What changed that this is no longer an option. In 365, you cant even build a form from a query.

  9. #9
    Pennguin is offline Novice
    Windows 10 Office 365
    Join Date
    Dec 2020
    Location
    Pennsylvania
    Posts
    11
    I get that the data is stored in the tables. But as you can see from the above screen shots, there is a ton of data within this form. If I needed to go back and change some data within a select record, it would take me days to go through the table view to change the data. That is the benefit of the Form view. However, in its current setting within this database, once the form view is closed, all data is lost within the form view. This should not be the case. Since the Form view is only a nicer way of seeing the data stored inside the table, it should not blank out all data for all records when I close the form. Otherwise the form view will need to have all the data reloaded every time the database is opened, and that will cause duplicate records.

  10. #10
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    The word (New) suggests you are opening the form to a new record, likely because as stated, you have data entry property set to yes, which you forgot to report back on.
    As for filters, that would be a property sheet setting or it is often done in code in the form load event. I presume you are the designer, so if you have to ask that question I'd say none are being applied because it's not something that happens by chance.

    If you remain stuck, suggest you copy the db, compact the copy, zip it and post it here for analysis.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  11. #11
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,861
    Where can I find this flag at?

    And if I switch the flag to NO will that forbid me from adding more employees in the future?
    Click image for larger version. 

Name:	Screenshot 2020-12-26 182038.jpg 
Views:	24 
Size:	38.2 KB 
ID:	43750

    Yes you can still add new records
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  12. #12
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    ....This should not be the case. Since the Form view is only a nicer way of seeing the data stored inside the table, it should not blank out all data for all records when I close the form. Otherwise the form view will need to have all the data reloaded every time the database is opened,
    That's basically how it works. If you want to show data that is stored in a table in/on a form, then you need a record source (read that as where should I get the data values to show?)

    If your form is for the entry of new data into a table, then the DataEntry = Yes is a common technique.

    ...and that will cause duplicate records.
    ?? Why would that be?? That is a misunderstanding on your part.

    Access, and other database software, allows you to set up features to prevent/alert you if you attempt to add a duplicate record.

  13. #13
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,706
    And if I switch the flag to NO will that forbid me from adding more employees in the future?
    The 'Data Entry' form property is very badly named. It should be named 'New Records Only', because that's what happens when it is set to Yes. The form cannot see previous records. It can only be blank, or show the record currently being created.
    Last edited by davegri; 12-26-2020 at 05:37 PM. Reason: sp

  14. #14
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    should have refreshed my page before posting - didn't see the question about where the property was. As for
    "In 365, you cant even build a form from a query." no idea where you get that notion from. Certainly is doable.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  15. #15
    Pennguin is offline Novice
    Windows 10 Office 365
    Join Date
    Dec 2020
    Location
    Pennsylvania
    Posts
    11
    Yeah this is very frustrating. I didn't know I could upload the whole database. Will compress it and "zip it" to you. This is really kicking my butt. I appreciate all your help on this matter. I'm getting tired of rebuilding this database and reentering all the data.

    All the settings are set to the default of the program. Nothing was changed. The reason why you are seeing the "New" is that is what appears on the form when I reopen it. You will also see on the form 1 there is 145 records. However when I close the form and reopen in as in form 3, there is only one record, the blank one you see on the screen. This should not happen every time I open or close this form. The data still exists in the table, but why isn't it viewable in the form?

    Sending a screenshot of the property window. Maybe that helps.Click image for larger version. 

Name:	propertyscreen.jpg 
Views:	22 
Size:	198.0 KB 
ID:	43751

    Ignore the query, that was me trying to figure this out. It is irrelevant for this issue.

    Thanks
    Attached Files Attached Files

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

Similar Threads

  1. Access Pivot Table: losing Detail Data when Exporting to Excel
    By MichaelSchulz in forum Import/Export Data
    Replies: 7
    Last Post: 05-12-2015, 05:10 PM
  2. Replies: 8
    Last Post: 04-12-2014, 01:29 PM
  3. Replies: 4
    Last Post: 01-18-2013, 02:41 PM
  4. Exporting to Excel- losing data from combo box
    By SteveS in forum Import/Export Data
    Replies: 3
    Last Post: 07-17-2012, 01:07 PM
  5. losing data
    By semicolan1 in forum Access
    Replies: 7
    Last Post: 01-04-2012, 04:41 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