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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform problems

Status
Not open for further replies.

Lizzer

Technical User
May 6, 2001
2
US
I have a form with a subform that contains multiple records. These are not in datasheet.. I have a form with the record selector at the bottom of the subform screen. My problem is ... I have code on a date field in the subform that checks once a date is entered that a related currency field is also filled in. This then does a reclaculation on the main form to provide a cumulative total of all the subform records. After this me.recalc is done the subform goes back to the first record in the set even if I was updating the fourth record. How can I keep the focus on the record that I'm working in after the recalculation??? Help Lizzer
 
Hi.

Generally you would:

dim bk1 as variant ' to hold a bookmark (*)
bk1 = me.recordsetclone.bookmark ' remember where you are
' do the recalc
me.recordsetclone.bookmark = bk1 ' puts you back

(* bookmark if you have the patch to make bookmarks work - i read recently that the bookmarks don't work properly in Access '97 until you install a patch.)

Gzep.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top