Position on subform

seeker63a

Registered User.
Local time
Today, 12:36
Joined
Mar 30, 2014
Messages
16
I have a subform which holds data in a datasheet mode. when i delete a record i close the parent form and then reopen it because i am not having luck making the requery work. the user wants the position to be at the location the form was before deletion although it will be a different record. I have tried

DoCmd.GoToRecord acdataform, "frmVendorList", acgoto, 17 and it gives me a error saying that the frmVendorList is not open. That is the form that is the subform the line before i open the parent form. The name for the subform in the property sheet is frmVendorList. Thank you for your wisdom.
 
Thank you for the response. the parent form has a textbox which when onleave a search is done on the subform to find the certain record. No master/child link needed. so when I search and find two records with BFI I delete one and then the form should appear with record selector next to the additional BFI entry.
 
Set your focus on the subform then execute the command
Me.frmVendorList.SetFocus
DoCmd.GoToRecord acActiveDataObject, , acGoTo, 17

acActiveDataObject does not need a name

Goh
 
Last edited:
Thank you very much. I will do extensive testng tomorrow but initially it looks like this did the trick.
 

Users who are viewing this thread

Back
Top Bottom