Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date on Report

Status
Not open for further replies.

5556

Programmer
May 27, 2003
17
0
0
US
I have a form that the user fills out and the values entered go into a report. I can figure out how to do this with everything except the date. On the form I used the Microsoft date and time picker control 6.0 and i do not know how to link the date the user picks from the form to the report.
 
place a textbox on the form. The in the design mode, click on properties and on the doubleclick event, write the following code;

Me.textbox0 = int(now())

now() is a function whose data on the left of the decimal point is the date and on the right is the time from midnight to midnight. Thus the use int() cuts off the time. I always do a doublclick on a date field and put the above as shown. I also check to see if isnull(me.field?) before doing it. This makes a nice place to do an if/else and if the date has been input go forward or backward a date to help the user get the date without ever having to type it in. Questions?

rollie@bwsys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top