If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Filtering by week
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! |
#2
|
|||
|
|||
Filtering by week
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! |
#3
|
|||
|
|||
Filtering by week
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! |
Thread Tools | |
Display Modes | |
|
|