Go to a record in a subform

S

Sean

I have a subform called dates within a form called products. when i edit a
date in the subform, it recalculates the main form and displays record 1 in
the subform. i want to remain at the record edited in the subform.
i use
Dim pos As Integer
pos = Form_dates.CurrentRecord

this gets the record edited in the subform before recalculating the form. i
now want the subform to display the record at pos. i tried to use
DoCmd.GoToRecord acDataForm, "dates", acGoTo, pos but it gives me an error -
object is not open. I have used this on the main form and it works fine so it
must be because its a subform. is there a way to get around this?

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top