Results 1 to 11 of 11
  1. #1
    alfrei is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    7

    Content in subform erasing when updating form

    Hi There,



    I'm quite new to Access and have been tasked with keeping track of call attempts for a survey. I've inserted an Attempts subform into the Physician Attempts main form (see below). However, as soon as I hit save, all the contents from the Attempts record disappears. I know the entry still exists, because I can see it in the table the data originates from. Additionally, when change the address, using a pop form, the contents in the Attempts subform disappear. Same thing, they still exists in the original table. If I change the address in the form before I enter data in the subform, there is no issue. My question is: How can I have the Attempts subform keep visible all the data entered in it? I'd like a list of all attempts to be visible. Any help would be greatly appreciated!

    Click image for larger version. 

Name:	physician attempts.png 
Views:	17 
Size:	142.1 KB 
ID:	25974
    Attached Thumbnails Attached Thumbnails Physician form.png  

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Do you have the main form and the sub form linked? It doesn't sound like it.....

  3. #3
    alfrei is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    7
    I thought so, but now I'm not sure whether what I did was link them.
    Click image for larger version. 

Name:	link.png 
Views:	16 
Size:	194.8 KB 
ID:	25975

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Looks like they are linked.

    When you enter data, do both "CPSO Number" AND the "Assigned To" fields have data?
    Because you are linking on two fields, BOTH fields need to have data.

  5. #5
    alfrei is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    7
    When I enter data in the subform, "CPSO Number" and "Assigned To" are pre-populated. But then when I save anything new I add, all fields except those two disappear.

  6. #6
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    That sounds like you have your subforms set to continuous and when you save the record it is going to the next (new) record. Not sure what you mean by save, however.

    The property is form the form and is called Cycle.

  7. #7
    alfrei is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    7
    When I changed the Cycle to "Current Record" the entry still disappeared. Do I need to also change Record Lock to either "All Records" or "Edited Records". I appreciate your help!!

  8. #8
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    What exactly do you mean by "hit save"? Are you meaning the ribbon button?

    Can you attach a copy of your database here?

  9. #9
    alfrei is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    7
    I've attached a blank version. I hope that's alright.
    Attached Files Attached Files

  10. #10
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Sorry for the length of this post......

    I stole the following from a post by orange - it is better than anything I could write:
    ----------
    "I recommend you create a narrative in simple terms about your proposed database and application. You don't start building a database by identifying a Form with 3 buttons. Now, that may very well be your initial user interface, but that is not the database. It is not as easy as many think to clearly describe WHAT your business is/will be. Consider the "things" involved(entities), the particular characteristics of each(attributes) that are important for your business and how these things relate to one another (relationships). After you have the narrative, you can use pencil and paper (or whiteboard or cardboard or ...) to develop and refine a data model. Create some test data and vet your model.
    <snip>

    <snip>
    I see too many people, who have the latest HW and Access, jumping in head first think the software will build the database. They have multiple issues and can't access the data required for X and/or Y, and typically it is an issue of basic table and relationship design. Their next "rationalization" is " I've got too much invested to go back and correct the design...". Don't get yourself in that predicament.

    You have to do the analysis, build a plan, set priorities......Since you have the business, you know the processes better than anyone, so analysis should be second nature-- and providing you are familiar with database concepts -- designing the database should be an iterative process and a good learning experience for you. The data model and testing/vetting will result in a blueprint for your database. Review, test, adjust, and repeat until you get the results you expect. People are here and willing to help."
    ----------

    Looking at your tables, you seem to have the relationship backwards.
    You have FollowUps (one) -->> Physicians (many).

    One Physician can have many attempts & One attempt is by one Physician
    Therefore this is a 1 to many relationship - One Physician --->> many attempts (follow-ups).

    The linking fields would be "[Physician list].PhysicianID" (PK) to "Follow-Up.PhysicianID" (FK).

    I name my primary key (PK) fields with a suffix "_PK" (example - PhysicianID_PK) and the foreign key (FK) fields with suffix "_FK" (example - PhysicianID_FK). I have no doubt which is the PK field and which is the FK field.


    You also might look at splitting the tables "Physician list" and "Follow-Up" into at least 3 additional tables based on the subforms in the tabs.






    Some suggestions:
    Use only letters and numbers (exception is the underscore) for object names.

    Do not use spaces, punctuation or special characters in object names. ( you have #, /, : in field & form names)
    Do not use look up FIELDS, multi-value fields or calculated fields in tables.
    Do not begin object names with a number.

    See:
    Microsoft Access Tables: Primary Key Tips and Techniques
    http://www.fmsinc.com/free/newtips/primarykey.asp

    Autonumbers--What they are NOT and What They Are
    http://www.utteraccess.com/wiki/index.php/Autonumbers

    Use Autonumbers properly
    http://access.mvps.org/access/general/gen0025.htm

    Is it ok to have Field names begin with numbers?
    http://www.access-programmers.co.uk/...d.php?t=206836
    See the post by pkstormy

  11. #11
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    I cannot reproduce your problem. Please detail the steps you are taking, each entry and click you do in turn.


    Click image for larger version. 

Name:	Untitled.png 
Views:	8 
Size:	68.0 KB 
ID:	25980

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

Similar Threads

  1. Replies: 2
    Last Post: 07-13-2016, 02:19 PM
  2. Replies: 2
    Last Post: 06-11-2015, 10:22 AM
  3. Replies: 4
    Last Post: 12-29-2014, 01:53 PM
  4. Updating Data in Form and SubForm
    By EddieN1 in forum Forms
    Replies: 1
    Last Post: 09-13-2012, 12:46 PM
  5. VBA Doesnt add content of subform to table
    By shabbaranks in forum Programming
    Replies: 14
    Last Post: 12-16-2011, 03:47 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