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

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 3105
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********@hotmail.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.com...
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********@hotmail.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
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...
2
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...
3
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...
2
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...
22
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...
3
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...
6
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...
14
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)...
3
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.