Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I have three different listboxes.
Year, Month and Day.
I want the current time to be selection by default.
So when i start the application. 2014 is choosed in the year, mars i choosed in the month and all the days choosed in the day list box.
And ofcourse, i want this to be dynamic, so when April starts, i want it to select April instead.
Is this possible?
Thanks
Use Document event trigger OnOpen and use 'Select in Field' action.
Add field name and mention below expression in Search string:
=Year(Today())
Hope this helps!
Setting >> Document Properties >> Document Event Triggers >> On Open >> AddAction >>
Add >> Selection >> Select in Field >> Field = Your Date field (i.e. Date)
Search String = Today() (i.e. =Today())
The same way if you keep Field = Month
Search String =
=Month(Today())
will give you desired result..
I added action to "OnPostReload"
Select in Field, Field =DayA and Search String =Today()
But this does not work..
HI
Try like this
Setting - Document Properties - Triggers-> Document Event Triggers - On Open
Add Action
Field SearchString
Month =Month(Today())
Year =Year(Today())
Day ='>='& Day(MonthStart(Today())) & '<=' & Day(Today())
hope it helps
Use Document event trigger OnOpen and use 'Select in Field' action.
Add field name and mention below expression in Search string:
=Year(Today())
Hope this helps!
I just realised that i dont need to choose days.
My tables names are MonthA and YearA.
So if i can choose Mars and 2014 by default that would be great.
I want it to be selected everytime i reload the data.
Thanks
Use OnOpen event trigger instead of OnPostReload event trigger.
Now i have "Select in Field"
Field =MonthA
Search String =Month(Today())
But that does not work....
Monthnames mentioned in below SET line should match with database month.
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
Plz change SET statement to make all the months in sync.
Just want to confirm. did you used like this
For Field it is MonthA
For Search String it is =Month(Today())