Results 1 to 10 of 10
  1. #1
    kcm4491 is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2010
    Location
    Nagasaki
    Posts
    12

    Form loosing link to table


    I have a form that has multiple subforms linked to it. The subforms are linked to the main form via the field "MainID". I do not know why or how, but recently the main form looses its link to the data. When I open the form it pops up requesting me to enter the Parameter Value for "MainID". When I just click OK, I get a message box stating; "The LinkMasterFields property setting has produced this error: `Return without GoSub`". I do not understand why I am getting this error because I do not have any code that I know of requiring a GoSub.

    As for the data, I have entered in previously, it is in the table, but the form does not recognize it.

    Is there a reason as to why this is happening?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Start by *importing* everything into a fresh, new db and see if the problem follows: http://www.btabdevelopment.com/ts/impnew

  3. #3
    kcm4491 is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2010
    Location
    Nagasaki
    Posts
    12

    Tried the importing

    I imported everything into a new DB and the message box popping up has disappeared, however, the form is still not seeing the previously inputted data. I tested by entering new data. The new data is on the table, but the previous data cannot be seen in the form.

    To add additional information. When I enter data in the open form, I can still see the data in the records I just entered. When I close the form and reopen it, I loose the link to the data in the form.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It sounds like you have eliminated the corruption. Now we need to understand your issue better. Are you using a MainForm/SubForm arrangement? Are the new values entered in the RecordSource of the form even though you cannot see them in the form? Is the RecordSource of the form a query or a table?

  5. #5
    kcm4491 is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2010
    Location
    Nagasaki
    Posts
    12

    To answer your questions

    Are you using a MainForm/SubForm arrangement? Yes. I have a MainForm with 7 SubForms. Each of the SubForms are linked to the "MainID" field on the MainForm and is the default value for the linked fields in the SubForms.

    Are the new values entered in the RecordSource of the form event though you cannot see them in the form? Yes, The values are recorded in each of the RecordSources via the form. During the session that they are entered, I can see the data. However, when I close the form and reopen it, the record count starts back at one


    Is the RecordSource of the form a query or a table? Table.



  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do you have Warnings turned off? What is/are the RecordSources of the SubForms, Table/Query? Are the controls in the SubForms bound?

  7. #7
    kcm4491 is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2010
    Location
    Nagasaki
    Posts
    12
    Warnings are not turned off. The RecordSources of the SubForms are tables with Bound Controls.

  8. #8
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Offhand it sounds like your forms/subforms form property could be set to 'Data Entry = Yes'.

    I like to add MainID to my subform and set the default value to =Forms!MyMainFormName!MainID (and either make it invisible or locked). I'll also set the recordsource to a query with criteria under the MainID Column such as: = Forms!MyMainFormName!MainID. I don't usually rely on the LinkMasterFields/LinkSubFields. This seemed more prone to problems with hiccup type networks.

    Also make sure 1 table per subform. Don't join the main table (or other data entry type tables) in the same recordsource of a subform. If you need to get information from the Main form, use a combobox or set the controlsource of a field to something like =Forms!MyMainFormName!FirstName (or to grab info from another form - =Forms!MyMainFormName!MyOtherFormName!FieldName. That's better than adding the main table or other table into the recordsource of the subform.

    If you still can't see past records entered, double-check that the relational field (MainID) is populated in each of the relational tables where needed.

  9. #9
    kcm4491 is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2010
    Location
    Nagasaki
    Posts
    12

    I got it!!!!

    First of all thank you for everyone's help. I got it working. I double checked all of the areas that were mentioned.

    Each subform has its own table. I made sure to start it that way because the subforms have multiple serial numbers entered in for each of the MainForm entries.

    Not all of the linked fields had the default value set to MainID on the main form, I added those in. The value from MainID was being recorded in each subform but I added the default value link to make sure it worked constantly.

    Last of all and what fixed it was setting 'Data Entry = No'. At that point everything started showing in the form.

    Thank you all again for your help.



    PS. I still have more to do on this, so I am sure I will be asking again.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thanks for posting back with your success.

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

Similar Threads

  1. Link Records in the Same Table
    By threepwoodjr in forum Database Design
    Replies: 4
    Last Post: 03-17-2011, 06:33 AM
  2. Loosing list box slection after refresh
    By oakoen in forum Forms
    Replies: 6
    Last Post: 11-23-2010, 11:21 PM
  3. Table link issue
    By rbienko in forum Access
    Replies: 2
    Last Post: 09-30-2010, 11:18 AM
  4. Replies: 1
    Last Post: 06-14-2010, 03:01 PM
  5. link excel form to access table
    By data123 in forum Import/Export Data
    Replies: 6
    Last Post: 06-23-2006, 10:17 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