Checkbox

A

Amelia

I have a checkbox that has this code:

Private Sub Check36_AfterUpdate()
If Me![Check36] = True Then
Me![Check Number].Visible = True
Else
Me![Check Number].Visible = False
End If
End Sub

It works perfectly except that when I check it, it makes the field check
number visible on all records. I only want it to show the field [check
number] on those records that have it checked true.

Any ideas or advice?
 
J

John W. Vinson

I have a checkbox that has this code:

Private Sub Check36_AfterUpdate()
If Me![Check36] = True Then
Me![Check Number].Visible = True
Else
Me![Check Number].Visible = False
End If
End Sub

It works perfectly except that when I check it, it makes the field check
number visible on all records. I only want it to show the field [check
number] on those records that have it checked true.

Any ideas or advice?

You'll need to use Format... Conditional Formatting from the menu, rather than
any code.
 
A

Amelia

John W. Vinson said:
I have a checkbox that has this code:

Private Sub Check36_AfterUpdate()
If Me![Check36] = True Then
Me![Check Number].Visible = True
Else
Me![Check Number].Visible = False
End If
End Sub

It works perfectly except that when I check it, it makes the field check
number visible on all records. I only want it to show the field [check
number] on those records that have it checked true.

Any ideas or advice?

You'll need to use Format... Conditional Formatting from the menu, rather than
any code.

Do you have more info on this? I don't see any property that says
conditional formatting. I am using Access 2007.
 
J

John W. Vinson

John W. Vinson said:
I have a checkbox that has this code:

Private Sub Check36_AfterUpdate()
If Me![Check36] = True Then
Me![Check Number].Visible = True
Else
Me![Check Number].Visible = False
End If
End Sub

It works perfectly except that when I check it, it makes the field check
number visible on all records. I only want it to show the field [check
number] on those records that have it checked true.

Any ideas or advice?

You'll need to use Format... Conditional Formatting from the menu, rather than
any code.

Do you have more info on this? I don't see any property that says
conditional formatting. I am using Access 2007.

Open the Form in design view; select the Check Number textbox; and select
Format... Conditional Formatting from the menu.
 
A

Amelia

John W. Vinson said:
John W. Vinson said:
I have a checkbox that has this code:

Private Sub Check36_AfterUpdate()
If Me![Check36] = True Then
Me![Check Number].Visible = True
Else
Me![Check Number].Visible = False
End If
End Sub

It works perfectly except that when I check it, it makes the field check
number visible on all records. I only want it to show the field [check
number] on those records that have it checked true.

Any ideas or advice?

You'll need to use Format... Conditional Formatting from the menu, rather than
any code.

Do you have more info on this? I don't see any property that says
conditional formatting. I am using Access 2007.

Open the Form in design view; select the Check Number textbox; and select
Format... Conditional Formatting from the menu.
There is no option that says Conditional Formatting. It gives me "general",
"currency", "euro", "scientific", etc...

Any other ideas?
 
J

John W. Vinson

There is no option that says Conditional Formatting. It gives me "general",
"currency", "euro", "scientific", etc...

Ah. You're looking in the Format property for the field.

I'm suggesting a DIFFERENT "Format" - the one in the Menu at the top of the
screen.

I don't have 2007 handy at the moment so my apologies if they've hidden this
someplace else!
 
B

beCe

Amelia said:
I have a checkbox that has this code:

Private Sub Check36_AfterUpdate()
If Me![Check36] = True Then
Me![Check Number].Visible = True
Else
Me![Check Number].Visible = False
End If
End Sub

It works perfectly except that when I check it, it makes the field check
number visible on all records. I only want it to show the field [check
number] on those records that have it checked true.

Any ideas or advice?
 
A

Amelia

I see where you are talking about. Unfortunatley when using a checkbox this
option is grayed out.
 
A

Amelia

Hi John,

I found what you are talking about. I am not familiar with the conditional
formating and am unable to make this do what I want. Should I do some sort of
expression? And if so what would it contain?

I will keep playing around with it, but so far I am not having any luck.
When the checkbox is checked it is still showing on all records.

Thanks for all the help!
 
J

John W. Vinson

Hi John,

I found what you are talking about. I am not familiar with the conditional
formating and am unable to make this do what I want. Should I do some sort of
expression? And if so what would it contain?

Use a field value:

checkboxfield = True
 
A

Amelia

I finally got it!! I needed to put the code in the "on current" event
property. Thanks for everything John!
 
A

Amelia

I got it to work by putting the code into the "on current" event property.
Thanks for all the help!
 
D

danile

hi are you ok thank you for text back to me i was on holiday lost week it
was my birthday on monday 3 august why did you text back
 

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

Top