473,507 Members | 9,962 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with date picker on form

Hi,
I'm using Office 2007. I have a text field called txtDate which is
formatted to medium date. This gives me the date picker when the
control has the focus.

I have several other text controls whose values change depending on
the value in txtDate.

If I type in the date in txtDate and press enter, all of the other
controls change as expected. However, if I use the date picker to
change date, the other values don't change, even though the date
displayed in txtDate changes. It appears that although date picker is
displaying the correct date in txtDate, txtDate.value is not being
set.

Does this make sense? How do I make date picker behave as if I had
typed in the date and pressed return?

Thanks for any help

Colin
Aug 6 '08 #1
1 6900
I'm assuming that the code that assigns values to your other textboxes
resides in the AfterUpdate event of your date field; this is the standard way
of handling this. The problem is that textbox AfterUpdates, OnChanges and
other similar events are only triggered if data is physically entered into
them. If values are entered programatically, they're not fired.

What you need to do is to tie triggering the AfteUpdate event of your date
field with some other event. What comes to mind is the date field's OnExit
event:

Private Sub DateTextBox_Exit(Cancel As Integer)
DateTextBox_AfterUpdate
End Sub

I don't have ACC2007 with it's native Calendar thinggie to test this, but
when you move out of the box after having entered the date thru the calendar,
this should do the trick.

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

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com

Aug 6 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2015
by: Billy Jacobs | last post by:
I have created a DataGridColumnDatePicker Component so that I can put a datetimepicker control in my datagrid. It almost works. When I put my mouse in the cell it changes to a datetimepicker...
26
4198
by: sgershon | last post by:
Hi. I know this is should be a simple question. I know server-side web-programming, and never needed to use client-side scripting... until now :) I have done so far a little number of scripts...
13
3067
by: Deano | last post by:
Hi, I generate a report using two dates (From and To). I notice if I enter 01/10/2003 that it is interpreted by Access as 10/01/2003 i.e 10th January rather than 1st October as I intended. ...
1
3549
by: Db1data | last post by:
Two machines look to a shared folder to use a database that resides on a third machine. Microsoft date picker version 6.0 controls are placed on a form to allow users to establish search criteria...
2
3135
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button...
1
4456
by: Sabbuser | last post by:
Hey Guys please help me out!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I have placed a Date & Time Picker Control on a form in Windows 2000, When our Organization has upgraded all the PC's with...
1
2073
by: 6afraidbecause789 | last post by:
Hi - I am using a Date/Time Picker popup form for users to choose a a date and time for use on a separate entry form. The date/time on the entry form is actually entered automatically as a...
2
2611
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
11
4986
by: jessy | last post by:
Hi, I have a problem with my DateTimePicker javascript code which i downloaded , the problem is when i pick the date and the date appears in my Text Field and i click Submit the date which i picked...
0
7221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7109
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1537
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.