473,385 Members | 1,740 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,385 software developers and data experts.

[Access 2003] problems with combobox-control and on_change

Hi group,
have problems with combobox-control in a form (access 2003).
I added VBA-Code to on-Change event of the control. If the user choose an
value from the control, the filter of the form change to that value.

so far it works.

problem is, it only works if the user change the (value of the) control
with the mouse. As soon as he starts pressing the keyboard, i get errors.

First i get the usual "Item not in list" messagebox but then i get an
error from the filter to. (trying to apply an useless filter).

Is there an way to check if the control has an useful value at the moment
or if the user is still typing in keys ? I want to fire the
on-change-event of the control only if the value of the control is an
value of it's control-source query.

I try the OnNotInList Function but got nowhere. Can you enlighten me
what to try next ?

thanks,
-Horst
Aug 13 '07 #1
2 2900
The OnChange event, by design, triggers as soon as the first key is pressed
(or a choice is made with a mouse). In other words, as soon as the value
begins to change this event fires.
If you want to be sure the value the user enters is only from the combo
box's record source, set the combobox LimitToList property to Yes. This
will stop the user from entering an invalid choice.
Once the choice has been picked (or entered), If you want to then take some
action based on the user's choice, use the AfterUpdate Event.
"Horst JENS" <ho********@chello.atwrote in message
news:7c***************************@news.chello.at. ..
Hi group,
have problems with combobox-control in a form (access 2003).
I added VBA-Code to on-Change event of the control. If the user choose an
value from the control, the filter of the form change to that value.

so far it works.

problem is, it only works if the user change the (value of the) control
with the mouse. As soon as he starts pressing the keyboard, i get errors.

First i get the usual "Item not in list" messagebox but then i get an
error from the filter to. (trying to apply an useless filter).

Is there an way to check if the control has an useful value at the moment
or if the user is still typing in keys ? I want to fire the
on-change-event of the control only if the value of the control is an
value of it's control-source query.

I try the OnNotInList Function but got nowhere. Can you enlighten me
what to try next ?

thanks,
-Horst
Aug 13 '07 #2
On Mon, 13 Aug 2007 08:45:20 -0400, Len Robichaud wrote:
The OnChange event, by design, triggers as soon as the first key is pressed
(or a choice is made with a mouse). In other words, as soon as the value
begins to change this event fires.
If you want to be sure the value the user enters is only from the combo
box's record source, set the combobox LimitToList property to Yes. This
will stop the user from entering an invalid choice.
Once the choice has been picked (or entered), If you want to then take some
action based on the user's choice, use the AfterUpdate Event.

This worked great !
Thanks a lot !

-Horst
Aug 16 '07 #3

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

Similar topics

12
by: Mike MacSween | last post by:
Sorry if this is a bit off topic, but I can't seem to find a 'remote control' newsgroup on my news server. And anyway I know Tony has some experience of this. The app is split FE/BE. I'd like...
7
by: Wayne Aprato | last post by:
I have several Access 2003 mde databases. When I try to open them in Access 2002 I get the following error: "The Visual Basic for Applications project in the database is corrupt." ...
0
by: Steve | last post by:
Greetings, I'm having problems with the use of an Access 2003 Add-In on Windows XP Pro. Administrative-level users have no problems running the Add-In, but those users with restricted rights on...
2
by: Jeff | last post by:
Does anyone know of any potential problems running a 2000 database with 2003? Also, what about installing all other Office products as 2003 versions but leaving Access as 2002 running a 2000...
0
by: luci | last post by:
Hello I've developed several data access pages and I searched for the same problems in different internet pages but I never got back a usable answer. Here are my questions: 1) How is it...
0
by: Miki T via .NET 247 | last post by:
Hi, I'm trying to "connect" a combobox with a simple Access 2000 database. The objective is to show the elements contained in a column of the DataBase (just a simple Datatable). Should be that...
2
by: SKarnis | last post by:
We are trying to rebuild a current Access 2002 (XP) mdb program to VB.NET with a SQL database - we are having problems with a suitable combobox. There are many threads discussing multiple column...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
14
by: ARC | last post by:
Hello All, I have a major application for quoting and invoicing that is written in Access 97 (both front and back ends). I have a user base of over 300 customers, and currently I don't require...
4
by: captainphoenix | last post by:
Windows XP Home Edition VB 2005 MS Access 2003 I am having problems importing mdb information from access to visual basic. The first application worked fine, but the second one refuses to work,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.