Popup Calender Allen Browne

G

gebo51

Hello access users,

I've used the popup calender who was presented on the website:
http://allenbrowne.com/ser-51.html and it is working very well.
My only problem is that the date, wich appears in the text box come's
in the short way: 09-03-2008
Is there a possibility to show it in the standard way: 09-03-2008
12:50:09

I've you could give me a reply with a vba example for the changes I
have to make, I would be very grateful
Thanks a lot.

Greetings
 
D

Damon Heron

In the OK click event of the form calendar, add the line after the else
line:
If Me.cmdOk.Enabled Then
If gtxtCalTarget = Me.txtDate Then
'do nothing
Else
gtxtCalTarget = Me.txtDate & " " & Time() 'this line right
here.....
End If
End If

HTH
Damon
 
L

Linq Adams via AccessMonster.com

How would you expect to retrieve a date and time from a calendar? Damon's
code will add the current time to the date you picked with the calendar, but
why would you want to use a calendar to return the current date/time? And if
you aren't using the calendar to return the current date/time, why would you
want the current time added to some date you pick? Exactly what "time" is it
you want along with a date?
 
G

gebo51

In the OK click event of the form calendar, add the line after the else
line:
If Me.cmdOk.Enabled Then
        If gtxtCalTarget = Me.txtDate Then
            'do nothing
        Else
            gtxtCalTarget = Me.txtDate & " " & Time() 'this line right
here.....
        End If
    End If

HTH
 Damon









- Tekst uit oorspronkelijk bericht weergeven -

Hello Damon Heron,
I'm calling from Holland, so excuse me for my poor english
Thanks very much for your example. it is working nicely.
Greetings
 
G

gebo51

How would you expect to retrieve a date and time from a calendar? Damon's
code will add the current time to the date you picked with the calendar, but
why would you want to use a calendar to return the current date/time? And if
you aren't using the calendar to return the current date/time, why would you
want the current time added to some date you pick? Exactly what "time" is it
you want along with a date?

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200803/1


Hello Ling Adams
Thanks for the reply. I'm calling from holland, so excuse me for my
poor english

I need de date and the time for calculate the day's or houres
(minutes) that someone is working on a project.
First I want to get the startday and time someone starts working on
the project and secondly the the eindday and time the person ends
working on the project.
With those two date's and times I can calculate the hours/minutes the
person has worked on the project.

With the code from Damon it is now working fine and I get the standard
notification, thus 10-03-2008 09:00
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top