Results 1 to 13 of 13
  1. #1
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80

    add 2nd record to continuous sub form produces error

    so i have a master form, and a continuous subform. i can edit the first record just fine, no problems. when i go to add a second record i get the error "the linkmasterfields property setting has produced this error: the object doesn't contain the automation object " [my table name] "



    i've checked it a thousand times, from the master and from the sub, and i can't find anything wrong with my data sources or relationships. any advice?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Provide the db for analysis. Identify objects involved.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    What are the settings for the properties called "Link Child Fields" and "Link Master Fields" of the sub form.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80
    the id of the record on the main form to the lookup field of the record on the sub form. as it's been this whole time. i didn't change anything, it's like it magically stopped working.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Don't understand why linking to a 'lookup' field. Is the ID primary key generated by autonumber? Why is the foreign key field even viewable?

    Lacking any other cause, possible corruption. The only solution to corruption is to rebuild. If only this form/subform has issue, then the db probably ok, rebuild the form/subform.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80
    Quote Originally Posted by June7 View Post
    Don't understand why linking to a 'lookup' field. Is the ID primary key generated by autonumber? Why is the foreign key field even viewable?

    Lacking any other cause, possible corruption. The only solution to corruption is to rebuild. If only this form/subform has issue, then the db probably ok, rebuild the form/subform.
    oh you again june... hehe

    maybe i explained it wrong, the main table's "ID" (autgen number) is the fk of the 2nd table that is the subform's record source. fk is only viewable in datasheet, not on the form in question. but in datasheet, it shows me the Last Name associated with the ID of the main table, since it's a 2 column lookup. it's mostly a visual aide. anyways... i tried rebuilding and the problem persisted.

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Then back to my first suggestion - provide db for analysis.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80
    mcdb.zip

    june you and i have had multiple "conversations" in regards to this database, and i've implemented all your teachings here. so in that regard... if it's broken i blame you . speaking of, you'll find that broken "upload image" form in there that i never made work.

    please keep in mind there's a lot of unpolished "i'll get to it later" things in there, mostly aesthetic, as i'm working on the functionality first.

    also the "help" file and the version notes are completely out of date, just stuff i didn't wanna leave behind, as this is a rebuild from another database. every once in a while as my skill set progresses, i find the need to start over fresh.
    Last edited by ck4794; 10-29-2013 at 06:29 PM. Reason: forgot a detail...

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Which objects are involved in the issue?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80
    i was having the automation object issue with adding a second record on the subform of frmProfile_Active (subVehicle). open frm home, select "Manage Profiles", select any one of the test profiles, click the drop down to view "Vehicles" and try to add one.

    The other issue we discussed at length was adding the image via a dialog box. this would be from frmuploadimages. it's been a while since i've toyed with that and i can't remember the exact state of it, but the idea was from the profile (where we just were in the above paragraph) you could click the "upload image" button under documents view, and a pop-up appears where you would add the image.

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I select Manage Profiles - then only Check In New Member has a combobox with 'Vehicles' as a choice.

    Don't need DoCmd.Save (that only saves form, not record). Record is committed to table when form closes, move to another record or run code (DoCmd.RunCommand acCmdSaveRecord).

    Private Sub btnSave_Click()
    DoCmd.Close
    End Sub

    Suggest you don't separate members into two tables for active/inactive. Have one table with a field for this attribute.

    Revised code for the image upload.
    Code:
          If .Show = True Then
            For Each varFile In .SelectedItems
                Dim rst As DAO.Recordset
                Const strTable = "tblImages"
                Const strField = "File"
                Set rst = CurrentDb.OpenRecordset(strTable)
                rst.AddNew
                AddAttachment rst, strField, varFile
                rst.Update
                rst.MoveLast
                rst.Close
            Next
          Else
             msgbox "You clicked Cancel in the file dialog box."
          End If
    However, since the Upload image form is always on the first record, the code will only address that record. This causes issues if there is already an attachment in the field.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #12
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80
    sorry, it didn't translate out of my head right. i forgot i've beeen working with this db on a daily basis for months on end... if from manage profiles, you select "active members", you will be presented a list of the active members (all test records. i did it this way to avoid this issue of multiple results for common names like smith, jones, etc. it's fairly unlikely to have two of them in the same division.) if you click the name, which is a hyperlink, it will take you to their profile. this is a different form. under "check in" you're taken to frmprofile_checkin. i haven't had any problems that i know of with this form. but after selecting an active member, it will take you to the form frmProfile_Active. this is where i had the problem with the sub_vehicle.

    not sure if it still does after all the failed attempts at making it work, but the original idea on the upload image form was on open go to new record. so if it's only addressing a new record there shouldn't be a problem?

    at one point i did have it that way, i had a field "status" which was active/inactive. the problem i ran into was that i don't need any of my inactive members in my reports, or calculations etc, as inactive members aren't bound to any of the rules (real world, not access "rules") the active members are. i'm only required to keep the names of the inactives. but they do switch statuses often so i don't want to lose that info. i was hoping for something a little more substantial than a combo box. any more advice on this?

  13. #13
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Set the image upload form DataEntry property to Yes if you want to only allow new records.

    Problems with this active member form are basically same as for the check in new member form.

    Still recommend one table for all members and an active/inactive field. Use filter in query to exclude the inactive. The form RecordSource can be based on SQL that excludes inactive. I would use one form for entry of new member records as well as to edit existing member records. I would use code to open that one form either to new record or to specified existing record. Then I would use one form for a search of members, active or inactive.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 18
    Last Post: 10-02-2013, 10:26 AM
  2. Replies: 1
    Last Post: 03-22-2013, 09:59 AM
  3. More than One Record on filtered Continuous Form
    By Williams485 in forum Forms
    Replies: 3
    Last Post: 03-13-2013, 04:56 AM
  4. Changing Printers Code produces an error
    By Perceptus in forum Programming
    Replies: 4
    Last Post: 01-15-2013, 08:33 PM
  5. No Current Record error - Continuous Form
    By tylerg11 in forum Forms
    Replies: 3
    Last Post: 08-25-2012, 08:43 AM

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