RANDALL R ANTHONY
RRANTHON at sentara.com
Sun Jan 27 13:37:55 CST 2008
Steve (and everyone), It was very simple really, based on your proposed resolution. Since I'm resolving which query to use in form A, I just set the openargs with everything there. Works like a champ. Solution below. Thanks again! Form A If BusUnit = 1 then DoCmd.OpenForm "Audit Entry", , , , , , "Select * from Audit_Data_Med WHERE " & Criteria else DoCmd.OpenForm "Audit Entry", , , , , , "Select * from Audit_Data_Fred WHERE " & Criteria end if Form B Private Sub Form_Load() Me.RecordSource = Me.OpenArgs End Sub >>> Steve Schapel <miscellany at mvps.org> 1/26/2008 9:33 PM >>> Randall, It also could be that it is easier/better to write the criteria directly into the Audit_Data_Med query or whatever it is? Regards Steve Randall Anthony wrote: > Gotcha! I was trying to work within the bounds of the existing code and > didn't explore alternatives to that. Since I am passing the openargs, why > not include the criteria (which can be multiple coming from form A) as in > proposed solution b and c? I'm tired of looking at it today, but I think > I'll explore those ideas tomorrow and report back posthaste. Thanks Steve, > and everyone else for your help. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com