|
Prev: Update/Append Query
Next: update blank fields
From: Fredrik on 7 Jul 2008 05:08 Hello! I have a form with a subform showing orders. Each post have a date (loadingdate). In the mainform I have a Textbox called "tbxWeek" and a commandbutton "cmdWeek". When I write a weeknumber and press the commandbutton I want the subform to only show the orders for the given week. The subform is showing a query so the real question is, what should i write in the query? Thanks!
From: scubadiver on 7 Jul 2008 05:41 In the query put this: wknum: format([loadingdate], "w") This will provide the week number. Then put a filter in the criteria row for this field that references the text box. "Fredrik" wrote: > Hello! > > I have a form with a subform showing orders. Each post have a date > (loadingdate). > In the mainform I have a Textbox called "tbxWeek" and a commandbutton > "cmdWeek". When I write a weeknumber and press the commandbutton I want the > subform to only show the orders for the given week. > > The subform is showing a query so the real question is, what should i write > in the query? > > Thanks!
From: KARL DEWEY on 7 Jul 2008 18:28 Make that wknum: format([loadingdate], "ww") as "w" will give you the day of the week based on Sunday being 1 and Saturday being 7. -- KARL DEWEY Build a little - Test a little "scubadiver" wrote: > > In the query put this: > > wknum: format([loadingdate], "w") > > This will provide the week number. Then put a filter in the criteria row for > this field that references the text box. > > > "Fredrik" wrote: > > > Hello! > > > > I have a form with a subform showing orders. Each post have a date > > (loadingdate). > > In the mainform I have a Textbox called "tbxWeek" and a commandbutton > > "cmdWeek". When I write a weeknumber and press the commandbutton I want the > > subform to only show the orders for the given week. > > > > The subform is showing a query so the real question is, what should i write > > in the query? > > > > Thanks!
|
Pages: 1 Prev: Update/Append Query Next: update blank fields |