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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bounded Textbox

Status
Not open for further replies.

justlearning2003

Technical User
May 26, 2003
34
CA

Hello,

I have a textbox bounded to a field back in my table. I want to place a command button next to the field to automatically populate today’s date. I have tried

txtdate.setfocus
txtdate.text = date

but this do not work.
Any ideas?

Chris
 
ALSO IT MAY BE NECESSARY TO DATE FORMAT THE TEXTBOX
CHEERS AGAIN,
JOHN
 
On the OnCurrent event of your form put:

me.txtdate.text = int(now())


The int( ) cuts of the fract or number on the right side of the decimal now(). That portion is the time. In the above way, we truncate to simple date. I think the use of 'me.' is good programming. I have programmed since 1959 and have been scuttled by such shortcuts ie: someone names a varable 'txtdate' and now the compiler is not confused. It has a protocol - you are confused!!!

rollie@bwsys.net
 
Yes,

Click on the form properties which can be reached in the design mode in the upper left corner of the form. It does not show until you 'threaten it' with the mouse arrow. Then right click and choose properties and events. Email for a sample.

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

Part and Inventory Search

Sponsor

Back
Top