Take a look at the attached file for a possible solution.
I hope this is helpfull.
Personeel2.qvw 136.2 K
I will try to explain what I did forgiozedzed1 here:
I used his attached Excel file for the data.
His question was simulare to yours, only his question was about days.
1 When you load that Excel file you can use the following script:
IF(ISNULL(Datumuitdienst) , 'Still Active' , Date(Datumuitdienst)) as Datumuitdienst
[Kopie van personeel.xls]
(biff, embedded labels, table is Blad1$);
2 Then make 2 new variables (CTRL+ALT+v)
3 create an inputbox with the variables
4 Creat below Macro (CTRL+m)
mySelect= ">=" & First & " <=" & Last
ActiveDocument.GetField("Datumuitdienst").ToggleSelect "Still Active"
5 Create a button with an action to start the macro
Properties >> Action >> Add : External >> Run Macro >>OK
Marco Name: SelectDatum
Fill in the inputbox the startdate (vStartDate) and the enddate (vEndDate) and press the button to execute the selection.
The macro selects the range on the fiels Datumindienst and Datumuitdienst
The last line in the script is optional, this line ad the `Still Active` ones to your selection on field Datumuitdienst.
("Still Active" is created in the script when there is no value in the field Datumuitdienst.
I hope this makes sence to you.
Kopie van personeel.xls 24.0 K