Prev: Query to count between list of number (Predicting Start/End that may occur in data range)
Next: Using tables created in 2003 IN 2007
From: siad.issa on 2 Apr 2010 16:51 كتب "Dorian" <Dorian(a)discussions.microsoft.com> في رسالة news:BCD036E5-BC6D-42A9-9450-BBF675418487(a)microsoft.com... > You could display a form to collect the value for ID, then store that > value > in a global variable. > Then all your queries could refer to the global variable via a function > call > whose only purpose is to return the ID. > Public Function GetID() As String > GetID = gblID > End Function > SELECT...FROM...WHERE... = GetID() > -- Dorian > "Give someone a fish and they eat for a day; teach someone to fish and > they > eat for a lifetime". > > > "Ann Needs help?" wrote: > >> Help? Currently I have a macro that runs about 10 to 15 queries. These >> queries are updates, inserts, and outputs to a spread sheet. They all >> prompt >> for a variable called - ID. I don't want to hardcode the variable >> because it >> changes alot. Short of rewritting all of the queries in VB, is there a >> way >> to have the macro only prompt me once for the ID variable. Sort of like >> a >> global variable? Currently I am using access 2003. Thank you, Ann |