Frinavale 9,735
Recognized Expert Moderator Expert
I'm not sure how to even describe the problem but here I go.
You know how you can display a date field in such a way that there is a calendar control that is "attached" to a text box that lets an end-user select a date?
How do you handle the "on change"/ "on update" event for the date?
I would like to update some sub forms based on a date change without having to click enter or hit the "refresh button" that I've provided to do the job. I was hoping to handle the event in VBA code and execute the method that I already have in place that updates the sub forms.
-Frinny
7 10014
Frinny, I've read your post several times and I'm still not exactly sure what you're asking. If you simply want to click on a calendar and assign the date to a textbox, without having to use a button as well, you can use the OnClick event of the calendar control: - Private Sub YourCalendarName_Click()
-
Me.DateField = Me.YourCalendarName
-
End Sub
If you're using an ActiveX Calendar Control, you have to go into the code module itself to access the OnClick event. Selecting an ActiveX Control and then going to Properties - Events doesn't expose all of the available events for the given control.
Linq ;0)> topher23 234
Recognized Expert New Member
Okay, what I get here is that you have code in a text box's AfterUpdate event, but it doesn't get called because the control's contents are being updated programmaticall y by a calendar control button. My general way of handling that is by calling the AfterUpdate event in code (borrowing linq's code): -
Private Sub YourCalendarName_Click()
-
Me.DateField = Me.YourCalendarName
-
DateField_AfterUpdate()
-
End Sub
-
ADezii 8,834
Recognized Expert Expert
You know how you can display a date field in such a way that there is a calendar control that is "attached" to a text box that lets an end-user select a date?
Hello Frinavale. I know exactly what you are referring to and it is called the DatePicker Control. This Control combines the functionality of a Textbox and a Calendar all rolled into one, to support both Novice and Power users. The User can easily select or manually enter a Date, there is no worry about Date Formatting, it is highly customizable, knows about Leap Years, and has built in Validation. I'm not exactly sure of what specific Events that this Control exposes, but it should be a simple matter to look it up if you are interested.
Frinavale 9,735
Recognized Expert Moderator Expert
Thank you ADezii.
I didn't know what it was called :)
I'll look into it!
(Probably not for a few days though, my evenings are booked right now)
-Frinny
topher23 234
Recognized Expert New Member
Ahh... is this the third-party OCX control, or the one I've heard comes built-in with Access '07?
I like to use Stephen Lebans' calendar, a text box and a button to make my date pickers. I guess I'm just old-fashioned that way, but custom ActiveX controls bug me.
ADezii 8,834
Recognized Expert Expert
You may find this very interesting, take a look:
mshmyob 904
Recognized Expert Contributor
Just ran across this post. Frin can you just not use the events for the control that is set to date. For instance you have a text box control that is formatted for 'short date' and 'show date picker'. After selecting a date from the date picker you would have an 'After Update' or any other event for the text box.
Would that not work?
cheers,
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: nh_capricorn |
last post by:
Hi,
I am fairly new to .NET (coming from a Java background) and I am trying to
port an application that I originally wrote in Java, to .NET / C#. My problem
is that I cannot find a C# analog for the javax.mail library. My original
program used this to access the calendar on Exchange, via IMAP and retrieve
appointments.
I have no idea how...
|
by: MLH |
last post by:
I'm having trouble pasting a VLS into a textbox
control on FormB. FormB is open in form view.
I'm trying to do it from a procedure running in
FormA. I'm up against 2048-Char limits no matter
how hard I try.
Funny thing is, I can easily hilite, cut 'n paste
into the control manually - no problem. I just
can't accomplish it from within code.
|
by: Rolf Barbakken |
last post by:
We have a need for showing the calendar belonging to a resource in Exchange
2000 (soon 2003).
Anyone have a any pointers to information on how this could be done?
Thanks.
--
_________________
|
by: joey.powell |
last post by:
I have a home page with username and password textboxes and a login
button for purposes of users being able to log in (forms
authentication) directly on the site home page. I also have a dedicated
"Login.aspx" page, but I don't want users redirected there unless
absolutely necessary.
I have registered a javascript block via...
|
by: Mumo |
last post by:
How do i create a calendar on a site using PHP code.
| |
by: rockdale |
last post by:
Hi, all
Is there a way to dynamically attach a regularexpressionvalidator to a
textbox base on dropdownlist selected item?
Let's say I have a dropdownlist list all contact type - phone, cell,
email ...etc and a textbox that allow user to type in their contact
info. When they choose email, I want attach the
regularexpressionvalidator of...
|
by: jamesd0142 |
last post by:
Hi what i want to do is basically what google autofill does when visiting a web page...
I imaging it...
finds anytext boxe's on the web page when the page loads...and highlights them...
What i'm looking to do is find the same textbox's on a page, so i can create a little program to auto log me into a webpage when i visit it.
How can this...
|
by: dr761 |
last post by:
I'm new to .net development, writing C#. I'm using a master page with 1 content placeholder. My first content page is named signup.aspx. Signup.aspx has a number of textbox controls. When the user clicks submit on signup.aspx, I execute Response.Redirect("purchase1.aspx", true); In the page load section of purchase1.aspx, I want to access...
|
by: joss Perold |
last post by:
Hi
I have a a gridview with a number of columns, each column has a textbox with a calendar extender attached. The problem comes when i click on the popup button, it opens a calendar for each row in the column at the same time. So if there are four rows, it will open 4 calendars.
How do i make it only open the one for the specific row i am...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |