Stuart McLachlan
stuart at lexacorp.com.pg
Thu May 12 17:29:05 CDT 2005
On 12 May 2005 at 8:42, Joe Rojas wrote: > Thanks for the replay Stuart! > > I just had couple of questions. > > Is this correct? > WHERE [DateOpened] BETWEEN StartDate() AND EndDate()#5/1/2005# AND > #5/7/2005# > > or did you mean > > WHERE [DateOpened] BETWEEN StartDate() AND EndDate() > Cut and paste error and not proff reading :-( , the second is correct. > Also I did not recognize this syntax: > > StartDate() txtStartDate > EndDate() txtEndDate > It's the same as Dim dteResult as Date dteDate = StartDate(TxtDate) Except that you don't create a variable and store the result of the function. Use it to call a procedure or to call a function if you are not interested in the result. The braces are not strictly necessary, but I always include them as a signal that I am not using a built in function. >From the Access Help <quote> Calling Sub and Function Procedures To call a Sub procedure from another procedure, type the name of the procedure and include values for any required arguments. The Call statement is not required, but if you use it, you must enclose any arguments in parentheses. ......... To use the return value of a function, assign the function to a variable and enclose the arguments in parentheses, as shown in the following example ......... If you're not interested in the return value of a function, you can call a function the same way you call a Sub procedure. Omit the parentheses, list the arguments, and do not assign the function to a variable, as shown in the following example. </quote> -- Stuart