Checkbox result help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When a checkbox on my form is checked (yes/true), I would like the result in
the corresponding field to be an "X". When it is not checked I would like
the result to simply remain blank.

I am working with a database in which the user simply typed the "X" in
either the table or form and I am trying to convert it to a checkbox on the
form.

I'm sure this question has been answered before but I haven't found it yet
or don't understand exactly what to do.

Thanks for your help in advance.
 
Run an Update query to convert x's to -1, blanks, nulls and other non-
trues to 0.
Change the datatype on the field to boolean.
Use checkboxes (or other control good for booleans) in all cases where
this field can be updated.

Absolutely ban with punishment of death people from editing directly
in tables.
 
Thank you for your reply.

I truely appreciate your help and I appreciate the fact that you are trying
to help people design their database in the best way, however this did not
answer my question as to how to produce an "X". I might use your suggestion
in the end, however at this time I would prefer to have an "X".
 
When a checkbox on my form is checked (yes/true), I would like the result in
the corresponding field to be an "X". When it is not checked I would like
the result to simply remain blank.

I am working with a database in which the user simply typed the "X" in
either the table or form and I am trying to convert it to a checkbox on the
form.

I'm sure this question has been answered before but I haven't found it yet
or don't understand exactly what to do.

Thanks for your help in advance.

Code the Check Box AfterUpdate event:
If Me![CheckBoxName] = True then
[Me![OtherControlName] = "X"
Else
[Me![OtherControlName] = Null
End If

Note: This will not change existing data in the field, only when you
check or uncheck the check box.

I would also suggest you set the enabled property of
[OtherControlName] to No to prevent a user from over-writing the
value.
 
I had to play with the syntax a little but this does produce the "X". Thanks
much! The only problem is that I can check the box the first time, it turns
grey rather than a check, and I can't uncheck it. Please help!

fredg said:
When a checkbox on my form is checked (yes/true), I would like the result in
the corresponding field to be an "X". When it is not checked I would like
the result to simply remain blank.

I am working with a database in which the user simply typed the "X" in
either the table or form and I am trying to convert it to a checkbox on the
form.

I'm sure this question has been answered before but I haven't found it yet
or don't understand exactly what to do.

Thanks for your help in advance.

Code the Check Box AfterUpdate event:
If Me![CheckBoxName] = True then
[Me![OtherControlName] = "X"
Else
[Me![OtherControlName] = Null
End If

Note: This will not change existing data in the field, only when you
check or uncheck the check box.

I would also suggest you set the enabled property of
[OtherControlName] to No to prevent a user from over-writing the
value.
 
I discovered the problem.
fredg said:
[Me![OtherControlName] = "X"
The "OtherControl" already existed and I had the controlsource the same for
both the checkbox and "OtherControl". Checkbox trying to put in a -1 at the
same time "OtherControl" trying to put in X.

Once more thanks for the help with the check box issue!!

fredg said:
When a checkbox on my form is checked (yes/true), I would like the result in
the corresponding field to be an "X". When it is not checked I would like
the result to simply remain blank.

I am working with a database in which the user simply typed the "X" in
either the table or form and I am trying to convert it to a checkbox on the
form.

I'm sure this question has been answered before but I haven't found it yet
or don't understand exactly what to do.

Thanks for your help in advance.

Code the Check Box AfterUpdate event:
If Me![CheckBoxName] = True then
[Me![OtherControlName] = "X"
Else
[Me![OtherControlName] = Null
End If

Note: This will not change existing data in the field, only when you
check or uncheck the check box.

I would also suggest you set the enabled property of
[OtherControlName] to No to prevent a user from over-writing the
value.
 
I had to play with the syntax a little but this does produce the "X". Thanks
much! The only problem is that I can check the box the first time, it turns
grey rather than a check, and I can't uncheck it. Please help!

fredg said:
When a checkbox on my form is checked (yes/true), I would like the result in
the corresponding field to be an "X". When it is not checked I would like
the result to simply remain blank.

I am working with a database in which the user simply typed the "X" in
either the table or form and I am trying to convert it to a checkbox on the
form.

I'm sure this question has been answered before but I haven't found it yet
or don't understand exactly what to do.

Thanks for your help in advance.

Code the Check Box AfterUpdate event:
If Me![CheckBoxName] = True then
[Me![OtherControlName] = "X"
Else
[Me![OtherControlName] = Null
End If

Note: This will not change existing data in the field, only when you
check or uncheck the check box.

I would also suggest you set the enabled property of
[OtherControlName] to No to prevent a user from over-writing the
value.

I'm not sure I understand your problem.
If you want specific help, you have to provide specific information.

What do you mean you 'had tp play with the syntax'?
What is the syntax you actually used?
Is the check box bound to a field in your table? It should be,
otherwise how will Access know which record gets the "X"?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top