If you are using an ADO connection to the backend database you can actually dynamically set paramters from code as well. You could also just simply design the query on the fly if need be and then submit the entire query as a SQL command.
--- Richard Killey <[EMAIL PROTECTED]> wrote: > Richard: > > One method is to have the VBA code place the value > in a hidden text box on > the form (or a visible one) and refer to that text > box from the query > > please something like this in the criteria cell in > the query > [forms]![form name]![text box name] > > > Richard "Manxman" Killey > MS Access Developer > > for more MS Access tips, visit > http://www.accessdatabasetips.com > > > > > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] Behalf > Of Richard Davis > Sent: September 21, 2005 9:55 PM > > I want to pass a variable from a VBA code on a form > to a query when it runs, > I am using VBA for MSACCESS 2003. Can someone help? > > > --------------------------------- > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/q7folB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AccessVBACentral/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
