Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

microsoft access 2010, event for change in text box date picker

Posted on 2014-04-29
10
Medium Priority
?
2,294 Views
Last Modified: 2014-05-06
I need to execute code at the exact point a date is selected in a text box using the date picker. After Update only seems to fire after the cursor exits the text box, not when a date is selected.
0
Comment
Question by:pabrann
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1800 total points
ID: 40030427
Try the OnChange event instead of AfterUpdate  event

mx
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 40030431
-
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1800 total points
ID: 40030449
And also ... refer to the .TEXT property of the text box - Example:

Private Sub txtYourDateBox_Change()

dim x
x = txtYourDateBox.Text


End Sub
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:pabrann
ID: 40030460
I thought that would work also but I tried the following and it does not change the text box named TD1 upon changing a date selected:

Private Sub txtStartDate_Change()
 
    Me.TD1 = txtStartDate


End Sub
0
 
LVL 75
ID: 40030466
Private Sub txtStartDate_Change()
 
    Me.TD1 = txtStartDate.Text


End Sub
0
 
LVL 26

Assisted Solution

by:Nick67
Nick67 earned 200 total points
ID: 40030541
@mx
I think the asker is close to winding up in the weeds.
The DatePicker is a fussy thing.
Even with OnChange you can be in the weeds with conditional formatting
http://www.experts-exchange.com/Database/MS_Access/Q_28218128.html

And the OnChange is problematic if some user starts typing in the box INSTEAD of using the DatePicker

@pabrann
You'll be a lot better off trying to get away from the operational requirement of "the exact point a date is selected in a text box" and moving to a "after a button right beside the textbox changed by the DatePicker is clicked."  Your present operational requirement is supremely difficult to execute flawlessly in all cases.

I'm just saying.  Have a look at the link

Nick67
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1800 total points
ID: 40030550
So far we are still in the grass Nick :-)

mx
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1800 total points
ID: 40045154
@pabrann
Has this been resolved ?

mx
0
 

Author Comment

by:pabrann
ID: 40046087
Yes it has, Sorry, but I thought I finalized it a number of days ago.  I'll review.
0
 

Author Closing Comment

by:pabrann
ID: 40046103
Excellent suggestions. My application is running and my client is very happy with me. I did not take credit and told them where I got the solution.

THANK YOU!!
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question