Max Wanadoo
max.wanadoo at gmail.com
Fri Jan 8 13:19:23 CST 2010
John, Top of head...assumes the recordset is bookmarkable -= test for it. Do your own dimming..dim BM as a variant. Set rst = me.recordsetclone strID = "ID=" & me!MyID If rst.bookmarkable Bm = rst.bookmark endif Docmd.openreport, "xya", acpreview....etc Rst.findfirst strID If not rst.nomatch then Me.bookmark = bm Else Msgbox "Out of luck John" Endif Don't start telling me off, it is only an example off the top of my head. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Clark Sent: 08 January 2010 19:07 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Question 2...returning to a form huh?! ;o) Seriously though, I'm not sure what this is. I will look it up though...thanks for the tip! >>> "Max Wanadoo" <max.wanadoo at gmail.com> 1/8/2010 2:00 PM >>> If you want to return to the record, save the Bookmark and then reposition on it. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Clark Sent: 08 January 2010 18:54 To: Access Developers discussion and problem solving Subject: [AccessD] Question 2...returning to a form OK, for those of you that might have read my other post, this is the next question... For those of you that may not have read it...or maybe your attention span is like mine and...where was I...oh, yeah...maybe you just need a reminder... I've got an entry form, w/a button on it. Press the button and a voucher is created from the data, and you get a print preview of said voucher. When you close the preview, you are returned to the data entry form. But...and herein lies the question...you are returned to record #1, and not where you were. This isn't a huge problem, because in reality, you would almost always be done w/a record, once you print and wouldn't need to return to it. But, the whole reason it goes to a preview to begin with, is that you can check and amend data. So, if there is a reason to change something, I don't want it going to record one and need to travel back to the current record. An easy, although not perfect, approach to this, might be to just open the form to the last record...contemplating this anyhow. Most of the time we will be printing the last record anyhow, so this would probably get us by, for the most part. However, if for no other reason, I'd like to do this, just so I can learn how to do it. So, how can I have my calling form return to its last known record? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com