Gustav Brock
gustav at cactus.dk
Tue Apr 20 13:58:32 CDT 2004
Hi Susan In the query you can pick the value from the form as an expression: Select ..., [Forms].[frmSomeForm].[txtTextbox] As FirstDayOfWeek From ... Is is recommendable also to specify this as a parameter to avoid type mismatch errors, indeed if the textbox is unbound: Parameters [Forms].[frmSomeForm].[txtTextbox] Byte; I don't know what your module does, but basically the date of the first day of the week of datDate can be found from this formula: DateWeekFirst = DateAdd("d", vbSunday - WeekDay(datDate, FirstDayOfWeek), datDate) You would need to replace vbSunday with the actual value (1 for A97). End Function /gustav > Let me rephrase that -- if I have to have a module, I don't think I really > care what gets passed where -- my hope was to eliminate the module and do > all the calculating in the query or the report and I thought I might be able > to bypass the module using the openargs argument. Replacing the module I > have for one that passes the value to a query really doesn't resolve the > issue I had. > Susan H. > That's what I'd like to do -- and may do yet by passing the firstdayofweek > value from the form to the query instead of the report. Truth is, I don't > know how -- I can't remember ever passing a value to a query before and a > parameter query is out.