By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,889 Members | 1,297 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,889 IT Pros & Developers. It's quick & easy.

database field on form never sending "on change" event

P: n/a
Hello

I am trying to create a separate listbox and fill it with items based on
what is in another field in a database.

This field is bound to a field in the underlying database. But the data is
changed from another list box that is a pulldown of the 3 items. This way
they are forced to select one of the 3 items.
So when the field updates based on the item chosen, why doesnt it cause the
"on change event" to happen? The field has changed. (It only works when
the user actually types something in). So I guess I am forced to put this
behind the list box's "on change" event?

Thanks in advance
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Sun, 30 May 2004 04:54:53 GMT, "Danny" <da********@hotmail.com>
wrote:

That's indeed the way it works. Programmatic changes rarely cause
events to be fired.

-Tom.

Hello

I am trying to create a separate listbox and fill it with items based on
what is in another field in a database.

This field is bound to a field in the underlying database. But the data is
changed from another list box that is a pulldown of the 3 items. This way
they are forced to select one of the 3 items.
So when the field updates based on the item chosen, why doesnt it cause the
"on change event" to happen? The field has changed. (It only works when
the user actually types something in). So I guess I am forced to put this
behind the list box's "on change" event?

Thanks in advance


Nov 13 '05 #2

P: n/a
Hi Danny,

Perhaps I haven't had enough coffee yet this AM, but the terminology that
you're using is really confusing me.
I'd suggest that you clarify and please include the code that you are using
now in subsequent replies.
See comments inserted below.

Don


"Danny" <da********@hotmail.com> wrote in message
news:xO******************@news4.srv.hcvlny.cv.net. ..
Hello

I am trying to create a separate listbox and fill it with items based on
what is in another field in a database. ----------------------
By "database", I assume that you mean Table?
This field is bound to a field in the underlying database. ----------------------
"This field" (The data container on a form is referred to as a Control, and
there are several different types of Controls... ie Textbox, Listbox,
Combo-box, etc)
"This field" = what ... the "separate listbox "?

But the data is changed from another list box that is a pulldown of the 3 items.
----------------------
"pulldown" ? of what "3 items"?
I think that what you need here is some code in the AfterUpdate event of the
"another list box" that forces a requery of the "seperate listbox"

This way they are forced to select one of the 3 items. ----------------------
Select them where ... how? Are we talking about 3 seperate combo-boxes
("pull-downs")?

So when the field updates based on the item chosen, why doesnt it cause the "on change event" to happen? The field has changed. (It only works when
the user actually types something in). ----------------------
Tom has already answered this. The OnChange event only fires when the text
in a Control is changed manually, not programatically.
So I guess I am forced to put this
behind the list box's "on change" event? ----------------------
Is this the same "another listbox" referred to above?
If so, then I'll repeat my suggestion to try the AfterUpdate event instead
of the OnChange event

Thanks in advance

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.