Max Wanadoo
max.wanadoo at gmail.com
Wed Oct 14 11:12:49 CDT 2009
Great. You could also do this...If you are clicking a button on the Main form and the control is on a sub form called "txtVehicleInspID" and the control holding the value is called VehicleInspID then DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & Me!txtVehicleInspID.form![VehicleInspID] Should do it. Pity you didn't ask a week ago <g> I recognise your name.. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hollis, Virginia Sent: 14 October 2009 17:07 To: accessd at databaseadvisors.com Subject: [AccessD] Open Report from MainForm based on SubForm Tada!!! Thank you so much. I spent a full week on this one part. Now I am behind on getting this out. I hate subforms. It has also been 6 years since I worked in Access & am 'very' rusty (yes, I use to be on AccessD regularly about since it started). I use to do it all the time but changed jobs. But you know how things come back to haunt you. Thanks again. DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID] Max -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com