John W. Colby
jwcolby at colbyconsulting.com
Wed Dec 22 12:07:41 CST 2004
The problem is probably the RemoveFilterSort. This will cause a requery of the form and potentially cause the record being displayed to change. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Christian, Lorraine Sent: Wednesday, December 22, 2004 12:42 PM To: Accessd at Databaseadvisors. Com (E-mail) Subject: [AccessD] Don't go to new record I am so sorry about the first message....forgot to unsecure it.... I hate our email system...sorry again. Hi there and Happy Holidays :) I have a form that can be printed by clicking a print command button. My problem is that when the client clicks the button, the form prints as expected however it goes to a new record. I want it to stay on the record that was printed. Below is the code behind my button. Private Sub cmdPrint_Click() DoCmd.SetWarnings False DoCmd.RunCommand acCmdSaveRecord DoCmd.GoToControl "[txtClaimNumber]" DoCmd.RunCommand acCmdFilterBySelection DoCmd.PrintOut acSelection, , , acHigh, 3, True DoCmd.RunCommand acCmdRemoveFilterSort DoCmd.SetWarnings True End Sub Any ideas? Lorraine Christian MassMutual Financial Group New Business Operations 413.744.5335 lchristian at massmutual.com --------------------------------------------------------- This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately by return e-mail and delete all copies. --------------------------------------------------------- -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com