473,379 Members | 1,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

I want to make a Controls Events Fire using code

For lack of the proper expression, how do I excite a control to cause
events to trigger.
I have a date control and am using a calender form button to fill the
text box with the date.
The text box is bound to a field. All this works great, but now the
date range validation is not
not working and the after update event that did calculations is not
working. This is without question the result of the control not
firing because I'm using code to make the entry. There must be a way
to make the control Dirty or whatever so that the events for the
control fire.

Any ideas?
Aug 11 '08 #1
8 2153

<co*****@gmail.comwrote in message
news:a4**********************************@p25g2000 hsf.googlegroups.com...
For lack of the proper expression, how do I excite a control to cause
events to trigger.
I have a date control and am using a calender form button to fill the
text box with the date.
The text box is bound to a field. All this works great, but now the
date range validation is not
not working and the after update event that did calculations is not
working. This is without question the result of the control not
firing because I'm using code to make the entry. There must be a way
to make the control Dirty or whatever so that the events for the
control fire.

Any ideas?
Validate the date before filling in the field?

Otherwise the event function is a sub routine that can be called.
Aug 11 '08 #2
"Greg (co*****@gmail.com)" <co*****@gmail.comwrote in
news:a400a6fb-ccbf-46b6-927a-
80**********@p25g2000hsf.googlegroups.co
m:
For lack of the proper expression, how do I excite a control to
cause events to trigger.
I have a date control and am using a calender form button to fill
the text box with the date.
The text box is bound to a field. All this works great, but now
the date range validation is not
not working and the after update event that did calculations is
not working. This is without question the result of the control
not firing because I'm using code to make the entry. There must be
a way to make the control Dirty or whatever so that the events for
the control fire.

Any ideas?
What you need to do is call the event procedure associated with the
event. Check out the Call statement in Help.

--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Aug 11 '08 #3
Thanks Bob

But I don't think you call the Validation Event using code?
I guess it requires a workaround.

Greg
On Aug 11, 5:40*pm, Bob Quintal <rquin...@sPAmpatico.cawrote:
"Greg (code...@gmail.com)" <code...@gmail.comwrote in
news:a400a6fb-ccbf-46b6-927a-
805c62226...@p25g2000hsf.googlegroups.co
m:
For lack of the proper expression, how do I excite a control to
cause events to trigger.
I have a date control and am using a calender form button to fill
the text box with the date.
The text box is bound to a field. All this works great, but now
the date range validation is not
not working and the after update event that did calculations is
not working. *This is without question the result of the control
not firing because I'm using code to make the entry. There must be
a way to make the control Dirty or whatever so that the events for
the control fire.
Any ideas?

What you need to do is call the event procedure associated with the
event. Check out the Call statement in Help.

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.com**
Aug 12 '08 #4
"Greg (co*****@gmail.com)" <co*****@gmail.comwrote in news:ba9dc9ea-
be*************************@k7g2000h...legroup s.com:
Thanks Bob

But I don't think you call the Validation Event using code?
I guess it requires a workaround.

Greg
I have no idea about what you mean in the phrase "Validation Event".
It's not an event associated with any Control, Form, Report or Query
that I've ever seen or heard of before.

The closest I can think of is the "Validation Rule" in the table
design, and that's not controllable via code.

If you mean "Validation Code", that can go into many events, depending
on WHAT is being validated. The control before and/or after_update
events and the Form's Before_Update are the usual places for this.

Please provide an explanation of WHAT you want to do, so we can tell
you the correct way to perform what you want to do. \That's what we're
here for.
>

On Aug 11, 5:40*pm, Bob Quintal <rquin...@sPAmpatico.cawrote:
>"Greg (code...@gmail.com)" <code...@gmail.comwrote in
news:a400a6fb-ccbf-46b6-927a-
805c62226...@p25g2000hsf.googlegroups.co
m:
For lack of the proper expression, how do I excite a control to
cause events to trigger.
I have a date control and am using a calender form button to fill
the text box with the date.
The text box is bound to a field. All this works great, but now
the date range validation is not
not working and the after update event that did calculations is
not working. *This is without question the result of the control
not firing because I'm using code to make the entry. There must be
a way to make the control Dirty or whatever so that the events for
the control fire.
Any ideas?

What you need to do is call the event procedure associated with the
event. Check out the Call statement in Help.

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.com**



--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Aug 12 '08 #5
Thanks Bob

My mistake. I didn't realize that the ValidationRule was not a
traditional event.
I'll have to experiment with code in the beforeupdate event to make
sure that the START date entered by my calender form button is <=
2000, and not greater that
the END date. And need to also excite the textbox using code, because
that does not take place now, and the entry goes unnoticed.

On Aug 12, 5:35*pm, Bob Quintal <rquin...@sPAmpatico.cawrote:
"Greg (code...@gmail.com)" <code...@gmail.comwrote in news:ba9dc9ea-
becf-4464-b7d4-726bec019...@k7g2000hsd.googlegroups.com:
Thanks Bob
But I don't think you call the Validation Event using code?
I guess it requires a workaround.
Greg

I have no idea about what you mean in the phrase "Validation Event".
It's not an event associated with any Control, Form, Report or Query
that I've ever seen or heard of before.

The closest I can think of is the "Validation Rule" in the table
design, and that's not controllable via code.

If you mean "Validation Code", that can go into many events, depending
on WHAT is being validated. The control before and/or after_update
events and the Form's Before_Update are the usual places for this.

Please provide an explanation of WHAT you want to do, so we can tell
you the correct way to perform what you want to do. \That's what we're
here for.


On Aug 11, 5:40*pm, Bob Quintal <rquin...@sPAmpatico.cawrote:
"Greg (code...@gmail.com)" <code...@gmail.comwrote in
news:a400a6fb-ccbf-46b6-927a-
805c62226...@p25g2000hsf.googlegroups.co
m:
For lack of the proper expression, how do I excite a control to
cause events to trigger.
I have a date control and am using a calender form button to fill
the text box with the date.
The text box is bound to a field. All this works great, but now
the date range validation is not
not working and the after update event that did calculations is
not working. *This is without question the result of the control
not firing because I'm using code to make the entry. There must be
a way to make the control Dirty or whatever so that the events for
the control fire.
Any ideas?
What you need to do is call the event procedure associated with the
event. Check out the Call statement in Help.
--
Bob Quintal
PA is y I've altered my email address.
** Posted fromhttp://www.teranews.com**

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.com**- Hide quoted text -

- Show quoted text -
Aug 13 '08 #6
"Greg (co*****@gmail.com)" <co*****@gmail.comwrote in
news:b5**********************************@a70g2000 hsh.googlegroups.co
m:
Thanks Bob

My mistake. I didn't realize that the ValidationRule was not a
traditional event.
The only thing that triggers the validation rule is writing the record
back to the table. That may be adequate, although it's often too late
in the data entry process to be user friendly..
--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Aug 14 '08 #7
"Greg (co*****@gmail.com)" <co*****@gmail.comwrote in
news:b551597d-dcf8-4b93-a9b7-
bc**********@a70g2000hsh.googlegroups.co
m:
Thanks Bob

My mistake. I didn't realize that the ValidationRule was not a
traditional event.
I'll have to experiment with code in the beforeupdate event to
make sure that the START date entered by my calender form button
is <2000, and not greater that the END date. And need to also
excite the textbox using code, because that does not take place
now, and the entry goes unnoticed.
Put the code into the before update event.
In the code behind the calendar form's button,
call Forms!<<mainform>>!<<textbox>>_AfterUpdate.

You need to change that event's definition to public.
and the <<mainform>>, <<textbox>metavariables to the real names.
Q
>

On Aug 12, 5:35*pm, Bob Quintal <rquin...@sPAmpatico.cawrote:
>"Greg (code...@gmail.com)" <code...@gmail.comwrote in
news:ba9dc9ea-
becf-4464-b7d4-726bec019...@k7g2000hsd.googlegroups.com:
Thanks Bob
But I don't think you call the Validation Event using code?
I guess it requires a workaround.
Greg

I have no idea about what you mean in the phrase "Validation
Event". It's not an event associated with any Control, Form,
Report or Query that I've ever seen or heard of before.

The closest I can think of is the "Validation Rule" in the table
design, and that's not controllable via code.

If you mean "Validation Code", that can go into many events,
depending on WHAT is being validated. The control before and/or
after_update events and the Form's Before_Update are the usual
places for this.

Please provide an explanation of WHAT you want to do, so we can
tell you the correct way to perform what you want to do. \That's
what we're here for.


On Aug 11, 5:40*pm, Bob Quintal <rquin...@sPAmpatico.cawrote:
"Greg (code...@gmail.com)" <code...@gmail.comwrote in
news:a400a6fb-ccbf-46b6-927a-
805c62226...@p25g2000hsf.googlegroups.co
m:
For lack of the proper expression, how do I excite a control
to cause events to trigger.
I have a date control and am using a calender form button to
fill the text box with the date.
The text box is bound to a field. All this works great, but
now the date range validation is not
not working and the after update event that did calculations
is not working. *This is without question the result of the
control not firing because I'm using code to make the entry.
There must be a way to make the control Dirty or whatever so
that the events for the control fire.
Any ideas?
>What you need to do is call the event procedure associated
with the event. Check out the Call statement in Help.
>--
Bob Quintal
>PA is y I've altered my email address.
** Posted fromhttp://www.teranews.com**

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.com**- Hide quoted text -

- Show quoted text -



--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Aug 14 '08 #8
<co*****@gmail.comwrote
My mistake. I didn't realize that the ValidationRule
was not a traditional event.
An Access Validation Rule is a Property, not an event. You can write
validation for the BeforeUpdate event of a Form, or the AfterUpdate event of
many Controls, if you want to performs some complex validation.
I'll have to experiment with code in the
beforeupdate event to make sure that the
START date entered by my calender form
button is <= 2000, and not greater that
the END date.
You press, or click, a Button Control, and you execute code or macros, but
values are going to come from some other source.
And need to also excite the textbox
using code, because that does not
take place now, and the entry goes
unnoticed.
"Excite" a text box? Do you perhaps mean "highlight" the textbox, for
example, by changing the backcolor or the text color? If you'll clarify, I
am sure someone can assist.

Larry Linson
Microsoft Office Access MVP
Aug 19 '08 #9

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

Similar topics

5
by: MS Newsgroups | last post by:
Hi, I have a scenario where I am dynamically adding a control from code when a controls event is fired. The problem I have is that when the newly created control is clicked, the click event does...
8
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image...
2
by: Tim Marsden | last post by:
Hi, This is what I am doing, please comment if this is the correct way. I need to add controls to a form dynamically. Within the Page_Load event (is not Postback) I run a routine to create the...
4
by: JezB | last post by:
I am dynamically creating WebControls and creating them on my page. Some of these are buttons, and I attach events to these buttons. The problem is these force a post-back, so I must regenerate all...
1
by: Paul | last post by:
An early Happy Thanksgiving to you and yours... We develop data driven apps. We dynamically place controls on a panel which may be then be placed on a web form or another control. My problem is...
4
by: Lenster | last post by:
Hi I'm using bound controls on a windows form such as textboxes, checkboxes etc. which work fine except for one thing... If you click on a checkbox for example its value changes visibly and...
5
by: Fred | last post by:
hi, i have a page written by someone else w/ a few user controls inside it(w/ user controls inside em too) - what i dont get is the order different page_inits, page_loads, cashed and postback...
0
by: Steve Moreno | last post by:
Hi all, I've got a web form that I've written code to create an array of DropDownList controls on the page depending on how many records are pulled back. The code to create the controls is...
5
by: Steve Moreno | last post by:
Hi all, I've got a web form that I've written code to create an array of DropDownList controls on the page depending on how many records are pulled back. The code to create the controls is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.