AccessNubee,
Button name -StartDate -EndDate
btnYearToDate - 1/1/(current year) - Today's Date
btnSinceLastPayment - (an answer from a Select query ) - Today's Date
btnSinceLastMeeting - (an answer from a Select query will go in the
MeetingDate field) - the others are left blank
(current year) = year(date())
Today's Date = date()
Using the onclick event you would pass the value in a fashion similar to
Me.FormControlName = Date()
Where FormControlName is the name of the Text Box that you wish to pass the
value to.
So if you wished to pass the YeartoDate value to your 'StartDate' then you'd
code it like:
Me.StartDate = "1/1/" & year(date())
A couple other function you may wish to be aware of for manipulating dates
DateAdd(), DateDiff(), Year(), Month(), Day()
Look in the help for example on their respective usage.
For allowing your user to select a date using a calendar take a look at
http://www.allenbrowne.com/ser-51.html
http://www.lebans.com/monthcalendar.htm

Signature
Hope this helps,
Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.com/index.php
Please rate this post using the vote buttons if it was helpful.
> DB is A2000 running on Access 2003
>
[quoted text clipped - 21 lines]
>
> Thanks!
AccessNubee - 21 May 2008 05:00 GMT
Excellent, I got the buttons to get the Year to date to work, I also ended
up doing the current year ( 1/1 to 12/31)
My next delima (I've been working on all night...) is to get the results
from a query to populate for either SinceLast...button.
Here's an example of my query to find the last payment:
SELECT Last(NationalDuesPayments.NationalPaymentDate) AS
LastOfNationalPaymentDate
FROM NationalDuesPayments;
How can I have the result go into the StartDate? I would prefer to have the
query in the code.
> AccessNubee,
>
[quoted text clipped - 62 lines]
>>
>> Thanks!
How about using a form to put the current (or any other date) into you
textbox(es)?
http://www.datastrat.com/Download/Calendar2K.zip

Signature
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
> DB is A2000 running on Access 2003
>
[quoted text clipped - 21 lines]
>
> Thanks!