Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform - Error 2105 “You can't go to the specified record".

Status
Not open for further replies.

robz2009

Programmer
Apr 20, 2009
41
GB
I have seen loads of posts in regards to Error 2105 “You can't go to the specified record.” And have tried the workaround setting the focus on the subform and then the control on the subform but I am still stuck and really struggling to find a solution.

The issue in question is a report which has a sub form and attempting to paste an image and subsequently create new images so they are all displayed on the one report.

The original code in the report is,

Forms![Temp_Image_View]![SIGNATURE].SourceDoc = IMASOURCEDOC
Forms![Temp_Image_View]![SIGNATURE].Action = OLE_CREATE_EMBED
Forms![Temp_Image_View]![SIGNATURE].SetFocus

DoCmd.GoToRecord A_FORM, "Temp_Image_View", acNewRec
DoCmd.GoToRecord A_FORM, "Temp_Image_View", acPrevious, 1

It fails on the first “DoCmd.GoToRecord” with the error 2105 - “You can't go to the specified record.”. As stated I have looked at a number of forums and tried the following but it still complains,

Forms![Temp_Image_View]![SIGNATURE].SourceDoc = IMASOURCEDOC
Forms![Temp_Image_View]![SIGNATURE].Action = OLE_CREATE_EMBED

Forms![Temp_Image_View].SetFocus
Forms![Temp_Image_View].Form![SIGNATURE].SetFocus
DoCmd.GoToRecord A_FORM, "Temp_Image_View", acNewRec
DoCmd.GoToRecord A_FORM, "Temp_Image_View", acPrevious, 1

The AllowAdditions property on the subform is set to Yes. The example report brings back 3 signature images. This code works on the first run but fails when trying the second and third cycle of adding the image i.e. creating a new record on the subform.

Any help would be greatly appreciated.

N.B. Please note this database was originally written in Access 2.0, I am in the process of converting it to Access 2000.
 
I am still not having any luck with this, does anybody have any ideas?

I may have to look at re-writing how this report references image files :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top