Query Subform with Option Group in

alpertunga65

Registered User.
Local time
Today, 08:02
Joined
Mar 15, 2013
Messages
21
Hi Everyone,

this is the first question that I have been asking here.

I have a main form named as FOTOFILM and a child form named as FOTOFILM_Subform ( Datasheet view, and datasource is a query builted on FotoFilm_table). they don't have relationship but the datasource for both is the same (FotoFilm_table).

On the main form FOTOFILM, I have an option group named optChoose and 5 options within. Options are;

The last week,
The last month
The last 3 months
The last 6 months
the last 12 months

I would like to query / filter FOTOFILM_Subform by clicking any option.

The field name ( to be filtered) IstekTrh (Date/Time-ShortDate)

So, I need an expert support to solve this problem.
Thanks a lot, and take care...

:) Keep smiling for your heart and health...

Peace at home, peace in the world...
 
The filters you need are

Code:
WHERE IstekTrh between dateadd('d',-7,Date()) and Date() 'last week
WHERE IstekTrh dateadd('m',-1,Date()) and Date() 'The last month
WHERE IstekTrh dateadd('m',-3,Date()) and Date()  'The last 3 months
WHERE IstekTrh dateadd('m',-6,Date()) and Date()  'The last 6 months
WHERE IstekTrh dateadd('yyyy',-1,Date()) and Date()  'the last 12 months
 

Users who are viewing this thread

Back
Top Bottom