Welcome to Dream.In.Code
Getting Help is Easy!

Join 105,759 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,722 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Current date in MS Access

 
Reply to this topicStart new topic

Current date in MS Access

boshman
post 27 Jun, 2008 - 04:37 AM
Post #1


New D.I.C Head

*
Joined: 6 Jul, 2007
Posts: 7


My Contributions


Hey, if anybody is willing I would like some help, I am currently trying to do some coding on a project in MS access 2003 and i need help with getting a current date into a text box or label etc :S the language is VB 6.0. P.S I have already tried such codes as
CODE
date.text = date
and
CODE
date.text = date$
as well as
CODE
date.text = now
I am fairly new to VB 6.0 so please any help is appreciated biggrin.gif
User is offlineProfile CardPM

Go to the top of the page


MRJ
post 28 Jun, 2008 - 06:07 AM
Post #2


D.I.C Head

Group Icon
Joined: 13 Oct, 2007
Posts: 82


My Contributions


to get current date in MS Access VBA you can use either Date() or Now(). You code looks good except that Date is a protected keyword so objects shouldn't be named date.

Here are some examples
CODE

'Populate a text box with date and time
text1.text = Now()

'Populate a label with the current date
Label1.Caption = Date()

User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/21/08 01:12PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month