I've built a Mileage Reimbursement app. Each request submitted must ONLY be for mileage from a specific week - designated by a selected "Week Ending Date" using DatePicker1.
Then, the user clicks "Add Trips" button to navigate to the "New Trip" screen - where they choose "trip date", and input "purpose", and "trip miles".
The app works great, but I had a request from the user to limit the dates available to choose as "trip date".
Currently "Trip Date" uses a date picker, which I cannot limit effectively - I need to use a dropdown for "Trip Date" to limit the choices available.
They want to allow users to add trips ONLY from the week that ends on the "Week Ending Date" entered for the parent request.
I am capturing the "Week Ending Date" entered, in a variable called 'varWkEndingDate' in the OnSelect property of the "Add Trips" button.
What I need is a dropdown of seven options, for the seven consecutive days/dates of the week that ends on selected "Week Ending Date" stored as 'varWkEndingDate'.
How do I create a collection (for a dropdown) of options for "Trip Date" that would list?...
varWkEndingDate-6
varWkEndingDate-5
varWkEndingDate-4
varWkEndingDate-3
varWkEndingDate-2
varWkEndingDate-1
varWkEndingDate
So for example, if the "Week Ending Date" captured was Sat, 12/24/22 - the dropdown would show...
Sun, 12/18/22
Mon, 12/19/22
Tue, 12/20/22
Wed, 12/21/22
Thu, 12/22/22
Fri, 12/23/22
Sat, 12/24/22