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

long-used checkbox errtatically refuses to accept check

P: 78
Hello again~~

A checkbox which up until now worked perfectly fine-- only had to accept a single letter-- now refuses approximately five out of every six records to accept one. This problem started only within the last week or so. Any suggestions?

chuck gregory
Jan 25 '08 #1
Share this Question
Share on Google+
11 Replies


missinglinq
Expert 2.5K+
P: 3,532
Your post is somewhat confusing. First suggestion would be to explain

"A checkbox... only had to accept a single letter"

How does a checkbox accept a letter? I wasn't aware that they could accept anything other than checkmarks!

Also, have any design changes occured in the database recently? Exactly what do you mean by "refuses to accept one?" You physically can't check the box?

Linq ;0)>
Jan 25 '08 #2

jaxjagfan
Expert 100+
P: 254
Missingling is correct. An actual checkbox as it is known in Access can only be checked or unchecked. The values for the field are -1 (Checked) and 0 (Unchecked).

If you have a textbox set up to accept single values and now some it will not accept, check the field attributes to see if it allows dupes. Check the datatype of the field - you may be entering text in a numeric field. Whereas a single letter sufficed when the database was developed, a 2 letter code is required now.

Give us some examples. Perhaps we can help you with a solution.
Jan 25 '08 #3

P: 78
Oops, sorry for the confusion. Actually it's a field used as a checkbox. I enter an x into if one is called for. Within the last week, another person who uses the database has been unable to enter the x in that field, but only in a majority of the records. Some will accept the keystroke.

I haven't had any occasion to change the form in a long time, nor the query associated with it, but I have modified the report which shares the same query. That particular field is not used in the report.

cg
Jan 25 '08 #4

jaxjagfan
Expert 100+
P: 254
Oops, sorry for the confusion. Actually it's a field used as a checkbox. I enter an x into if one is called for. Within the last week, another person who uses the database has been unable to enter the x in that field, but only in a majority of the records. Some will accept the keystroke.

I haven't had any occasion to change the form in a long time, nor the query associated with it, but I have modified the report which shares the same query. That particular field is not used in the report.

cg
You might want to check out the field size. If it is only one character and there is a blank space (" ") entered in the field you may be trying to enter "x" as a second value. If that is the case I would consider running an update query on the table to update that field to Null where its value not in ("x", "X") - if the field will except nulls and "x" or "X" are the only valid values.
Jan 25 '08 #5

P: 78
[i]You might want to check out the field size. If it is only one character and there is a blank space (" ") entered in the field you may be trying to enter "x" as a second value. If that is the case I would consider running an update query on the table to update that field to Null where its value not in ("x", "X") - if the field will except nulls and "x" or "X" are the only valid values.[/[/

You're saying I would create a query that would say Is Not Null OR <>"x" OR <>"X" ?

Then, when I got all those records isolated, go through and delete what would presumably be blank spaces typed into them?

cg
Jan 25 '08 #6

jaxjagfan
Expert 100+
P: 254
[i]You might want to check out the field size. If it is only one character and there is a blank space (" ") entered in the field you may be trying to enter "x" as a second value. If that is the case I would consider running an update query on the table to update that field to Null where its value not in ("x", "X") - if the field will except nulls and "x" or "X" are the only valid values.[/[/

You're saying I would create a query that would say Is Not Null OR <>"x" OR <>"X" ?

Then, when I got all those records isolated, go through and delete what would presumably be blank spaces typed into them?

cg
Just trying to help you troubleshoot your issue. There are quite a few possible reasons you are having data entry issues. Pick a record that you are having issues with and highlight the field values. If highlight is wider than the cursor then what I had stated may be the issue.

Any solutions we give you here should be tested on a backup copy of your database. Once you are satisified with the results then implement them in your "good" database.

For the update this would do it all at once (Just put in applicable table and field names):

Update MyTableName Set MyCheckFieldName = Null Where MyCheckFieldName Not In ("x","X");

I work with a lot of case sensitive data so I don't use the Like "x" syntax very much.

Update MyTableName Set MyCheckFieldName = Null Where MyCheckFieldName Like "x";

Using IN ("val1,"val2", etc) allows you to enter a variety of values to search for without using OR.
Jan 25 '08 #7

P: 78
jaxjagfan~~

I checked the table; it's a text field, 255 characters allowed, not indexed.

When I try to enter even the first keystroke, I get the error beep and no character.

How and where would I enter the Update routine you suggested? Thanks.

cg
Jan 25 '08 #8

missinglinq
Expert 2.5K+
P: 3,532
Given the on again/off again behavior, this is beginning to sound a lot like corruption! Of course, two questions are just screaming to be asked here:
  1. Why not simply use a Checkbox
  2. If you only want to accept a single character, why set the Field Size to 255?
Linq ;0)>
Jan 25 '08 #9

P: 78
WHY NOT USE A CHECKBOX?

I had to make the form look as close to the original as possible in order to avoid confusing the people who still use the orginal. This one is used interchangeably with the copies they fill out manually. They give me theirs; I give them mine with their multi-source information all put together in one place.

When I created it, I didn't know too much about databases, so didn't pay attention to field sizes.

How could it get corrupted? I'm the only one who deals with it. And if it is corrupted, how could I find out? Thanks.

cg
Jan 25 '08 #10

missinglinq
Expert 2.5K+
P: 3,532
"How could it get corrupted?"

Let me count the ways!

All seriousness aside, the ways are legion and to be honest, pinning down a reason is usually impossible! It can happen by Access not being shut down properly; the power goes or a user simply cuts off the computer without closing Access first. Compacting the database, which is often a necessary procedure, can cause it. Having an unsplit database on a shared drive can cause it. The list goes on and on.

"I'm the only one who deals with it."

But you mentioned another user in one of your post! Perhaps you mean you're the only one who does any development work on it? This doesn't matter, it can happen at anytime. But that brings up another question; is this a split database, with a frontend/backend, set up for multiple users?


There's nothing you can do, diagnostically, to pin down whether it's corrupted or not, but a form/query/report that has worked for a period of time and then, without anything design-wise being changed (I can't imagine a change to a report causing this) suddenly acts in an erratic manner is a prime indicator of corruption.

One procedure that sometimes help is to:
  1. Copy your database and move the copy to a safe location
  2. Create a new, blank database
  3. Import all objects from current database into new database
  4. Save new database
  5. Delete old database
  6. Re-name new database as old database
See if this helps.

Linq ;0)>
Jan 25 '08 #11

P: 78
Thanks, Linq; I'm on it.

cg
Jan 29 '08 #12

Post your reply

Sign in to post your reply or Sign up for a free account.