current record

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Hi,

How can i set the cursor back to the current record if i close a popup
form which requeries the first form?

If i close the popup form it goes back to the first record, which i
don't like.

Is there a way to solve this?
 
Do you have to requery the form?

In the main form, RIGHT before you launch the popup, I would force a disk
write.

me.refresh
......code to open up pop up etc goes here...

When you return to the form, any changes in the data should be visible.

If you *must* requery, then you have to save the current id, reuqery..and
then move the form back to the id.

I would test the above first, as you may not need a reuqery. However, if you
do, then try


dim lngID as long

lngID = nz(me!id,0)

if lngID = 0 then
exit sub
end if

me.requery

me.recordsetclone.FindFirst "id = " & me.id
me.bookmark = me.reocrdsetclone.bookmark

If you are running the requery from another form, then of course change me
to forms!yourformname in the above code.

And, if this is combo box not in list deal, then NONE of the above should be
used, nor needed.
 
Back
Top