473,785 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to prevent users from modifying data in combo box

I have a combo box look up and list items in a table, it is not bound.

It works fine but how can I prevent the users from entering in there own
data?

i have an 'on change' event that when it changes, it does something else to
a field based on their selection.
I also have the LimitTOList on, but when they click in there, they get an
error first that says the
2110-focus cannot move the focus to this control. (I have the .setfocus
command becuase access wants the focus set to a control when getting data
from it)

SO, why would they get an error?

what to do?
Nov 12 '05 #1
2 3140
OnChange fires with every keypress, but the combo can't check to see if the
selection is valid until the user tries to exit the control, because, of
course, you can't enter XYZ without entering X - Y - and Z, and the entry
isn't valid until the last character is typed.

You probably want to use the AfterUpdate event instead of OnChange - that
event won't fire until the user has actually picked a valid selection from the
list. Also, if Access wants you to have the focus on a control to read its
value, that might mean you are trying to use the .Text property to read the
value rather than the .Value property. In Access, .Text is the text that is
displayed in a control while an edit is in progress, and is only available
when the control has the focus.

On Tue, 20 Apr 2004 15:53:55 GMT, "Danny" <da********@hot mail.com> wrote:
I have a combo box look up and list items in a table, it is not bound.

It works fine but how can I prevent the users from entering in there own
data?

i have an 'on change' event that when it changes, it does something else to
a field based on their selection.
I also have the LimitTOList on, but when they click in there, they get an
error first that says the
2110-focus cannot move the focus to this control. (I have the .setfocus
command becuase access wants the focus set to a control when getting data
from it)

SO, why would they get an error?

what to do?


Nov 12 '05 #2
Thanks again!!

I change everytihng to the .value and it all works.
You really know your stuff

Thanks

"Steve Jorgensen" <no****@nospam. nospam> wrote in message
news:84******** *************** *********@4ax.c om...
OnChange fires with every keypress, but the combo can't check to see if the selection is valid until the user tries to exit the control, because, of
course, you can't enter XYZ without entering X - Y - and Z, and the entry
isn't valid until the last character is typed.

You probably want to use the AfterUpdate event instead of OnChange - that
event won't fire until the user has actually picked a valid selection from the list. Also, if Access wants you to have the focus on a control to read its value, that might mean you are trying to use the .Text property to read the value rather than the .Value property. In Access, .Text is the text that is displayed in a control while an edit is in progress, and is only available
when the control has the focus.

On Tue, 20 Apr 2004 15:53:55 GMT, "Danny" <da********@hot mail.com> wrote:
I have a combo box look up and list items in a table, it is not bound.

It works fine but how can I prevent the users from entering in there own
data?

i have an 'on change' event that when it changes, it does something else toa field based on their selection.
I also have the LimitTOList on, but when they click in there, they get an
error first that says the
2110-focus cannot move the focus to this control. (I have the .setfocus
command becuase access wants the focus set to a control when getting datafrom it)

SO, why would they get an error?

what to do?

Nov 12 '05 #3

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

Similar topics

12
2526
by: Dave Smithz | last post by:
Hi there, Users of my PHP DB application have complained that it seems to log them out every now and then. I actually assume this is when it has been idle for sometime as I use session variables to store a logged in token. With only basic knowledge of sessions I assumed there was some kind of default time before the session data is destroyed. Is this the case?
2
2322
by: Jesu | last post by:
How to prevent data updating in oracle tables through MS access or vc++ sql screen? As of now I am using product_user_profiles. Which is preventing only through SQL*plus. The same way I want to prevent from MS access and VC++ Please help Thanks in advance Jesu
3
3072
by: kjaggi | last post by:
I am trying to either write a trigger or a check constraint to prevent duplicates in my table. There are two columns I need to look at for the duplicates and only one combo value for both columns is allowed in the table. For e.g. Column Serial can have only one '123456' value with testresult value as 'PASS'. This serial can be in the table many times with any other combo so for e.g. The table could contain 100 entries for serial column...
2
560
by: Danny | last post by:
I have a combo box look up and list items in a table, it is not bound. It works fine but how can I prevent the users from entering in there own data? i have an 'on change' event that when it changes, it does something else to a field based on their selection. I also have the LimitTOList on, but when they click in there, they get an error first that says the 2110-focus cannot move the focus to this control. (I have the .setfocus
22
7582
by: alecjames1 | last post by:
I have a form which the user must complete before closing. I have disabled the window x button and use my own exit button. When selected it checks to see if the user has completed the entries otherwise it cancels the close. However, the user can still right click on the task bar and close my application. Is there any way of preventing this. Thanks Alex
3
13086
by: Tc | last post by:
Hi, I was curious, I am thinking of writing an application that loads a dataset from a database that resides on a server. The question I have is this, if multiple copies of the app will be running at once will there be problems with data updates? The reason I ask is I'm thinking like this: User1 launches the app and the dataset is created from the data in the DB.
6
4380
by: anoj | last post by:
Hi All i need to prevent multiple logins from the same user at the same time. what is the best way to do this . How can i detect if a user closes the browser window without logging out so tht his/her id can be removed from the global list maintained for the looged in users
14
2349
by: Ed Jay | last post by:
On a multi-textbox form, linked to an external js, I use onBlur to call: function chkNum(cellname) { var str = document.getElementById(cellname).value.toString(10); if (str < 28 || str > 36) {alert("Temperature entered is out of range."); return;} } I enter data into the first textbox and move the cursor to the second textbox. The function is properly called. Since textbox2 is empty, when I
3
4909
by: mfetterhoff | last post by:
Hello Experts.. Im checking out the other side of the tracks here.. always been a Systems Analyst kind of guy. Developers are a touchy and unpredictible lot. I try to give them their space and never poke my finger into their cages. I was sad that Steve Erwin didn't do a spot on Developers before he left us.. Anyway.. Figured I'd be doing pretty good for myself if I could find some assistance here, then back out before I got eaten alive. ...
0
10357
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10162
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9959
tracyyun
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7509
isladogs
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5396
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
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
3
2893
bsmnconsultancy
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.