Check a CheckBox


G

Guest

Hello

I want to tick a checkbox in a subform when i click a command button on a
form but then i want to refresh the data on the database becuase once that
checkbox is ticked, then it should not show up.

i have tried to refresh the database after i manaully checked the box but
the record still came up after i navugated back and forth. Want can i do ?

please can some help ?

Thank you
 
Ad

Advertisements

G

Guest

if you want to Hide the check box when it equal to True the on the OnClick
event of the button, try

Me.[SubFormName].Form![CheckBoxName] = Not
Me.[SubFormName].Form![CheckBoxName]
Me.[SubFormName].Form![CheckBoxName].Visible = Not
Me.[SubFormName].Form![CheckBoxName]
 
G

Guest

Thanks for the response, how do i tick the checkbox in the subfrm, using a
command button in the form ?

i appreciate the response

Ofer said:
if you want to Hide the check box when it equal to True the on the OnClick
event of the button, try

Me.[SubFormName].Form![CheckBoxName] = Not
Me.[SubFormName].Form![CheckBoxName]
Me.[SubFormName].Form![CheckBoxName].Visible = Not
Me.[SubFormName].Form![CheckBoxName]

--
\\// Live Long and Prosper \\//
BS"D


Moody said:
Hello

I want to tick a checkbox in a subform when i click a command button on a
form but then i want to refresh the data on the database becuase once that
checkbox is ticked, then it should not show up.

i have tried to refresh the database after i manaully checked the box but
the record still came up after i navugated back and forth. Want can i do ?

please can some help ?

Thank you
 
G

Guest

This part
Me.[SubFormName].Form![CheckBoxName] = Not
Nz(Me.[SubFormName].Form![CheckBoxName],0)

Me.[SubFormName].Form![CheckBoxName].Visible = Not
Me.[SubFormName].Form![CheckBoxName]


should change it in every click, so if its not click it will change it to
true, and if its True, it will change it back to False, and display the chck
box again.
Change the SubFormName to the name of the SubForm control name in the main
form.
Change the CheckBoxName to the name of the Check Box

--
\\// Live Long and Prosper \\//
BS"D


Moody said:
Thanks for the response, how do i tick the checkbox in the subfrm, using a
command button in the form ?

i appreciate the response

Ofer said:
if you want to Hide the check box when it equal to True the on the OnClick
event of the button, try

Me.[SubFormName].Form![CheckBoxName] = Not
Me.[SubFormName].Form![CheckBoxName]
Me.[SubFormName].Form![CheckBoxName].Visible = Not
Me.[SubFormName].Form![CheckBoxName]

--
\\// Live Long and Prosper \\//
BS"D


Moody said:
Hello

I want to tick a checkbox in a subform when i click a command button on a
form but then i want to refresh the data on the database becuase once that
checkbox is ticked, then it should not show up.

i have tried to refresh the database after i manaully checked the box but
the record still came up after i navugated back and forth. Want can i do ?

please can some help ?

Thank you
 
G

Guest

Sorry about this ofer, i really appreciate the help but all i want to do is
make the checkbox yes because once it is yes, it will never go back to no, if
you see what i mean. which code should i use for that function.

thanks again

Ofer said:
This part
Me.[SubFormName].Form![CheckBoxName] = Not
Nz(Me.[SubFormName].Form![CheckBoxName],0)

Me.[SubFormName].Form![CheckBoxName].Visible = Not
Me.[SubFormName].Form![CheckBoxName]


should change it in every click, so if its not click it will change it to
true, and if its True, it will change it back to False, and display the chck
box again.
Change the SubFormName to the name of the SubForm control name in the main
form.
Change the CheckBoxName to the name of the Check Box

--
\\// Live Long and Prosper \\//
BS"D


Moody said:
Thanks for the response, how do i tick the checkbox in the subfrm, using a
command button in the form ?

i appreciate the response

Ofer said:
if you want to Hide the check box when it equal to True the on the OnClick
event of the button, try

Me.[SubFormName].Form![CheckBoxName] = Not
Me.[SubFormName].Form![CheckBoxName]
Me.[SubFormName].Form![CheckBoxName].Visible = Not
Me.[SubFormName].Form![CheckBoxName]

--
\\// Live Long and Prosper \\//
BS"D


:

Hello

I want to tick a checkbox in a subform when i click a command button on a
form but then i want to refresh the data on the database becuase once that
checkbox is ticked, then it should not show up.

i have tried to refresh the database after i manaully checked the box but
the record still came up after i navugated back and forth. Want can i do ?

please can some help ?

Thank you
 
G

Guest

In that case try this code

If not Nz(Me.[SubFormName].Form![CheckBoxName],False) Then
Me.[SubFormName].Form![CheckBoxName] = True
Me.[SubFormName].Form![CheckBoxName].Visible = False
End If

--
\\// Live Long and Prosper \\//
BS"D


Moody said:
Sorry about this ofer, i really appreciate the help but all i want to do is
make the checkbox yes because once it is yes, it will never go back to no, if
you see what i mean. which code should i use for that function.

thanks again

Ofer said:
This part
Me.[SubFormName].Form![CheckBoxName] = Not
Nz(Me.[SubFormName].Form![CheckBoxName],0)

Me.[SubFormName].Form![CheckBoxName].Visible = Not
Me.[SubFormName].Form![CheckBoxName]


should change it in every click, so if its not click it will change it to
true, and if its True, it will change it back to False, and display the chck
box again.
Change the SubFormName to the name of the SubForm control name in the main
form.
Change the CheckBoxName to the name of the Check Box

--
\\// Live Long and Prosper \\//
BS"D


Moody said:
Thanks for the response, how do i tick the checkbox in the subfrm, using a
command button in the form ?

i appreciate the response

:

if you want to Hide the check box when it equal to True the on the OnClick
event of the button, try

Me.[SubFormName].Form![CheckBoxName] = Not
Me.[SubFormName].Form![CheckBoxName]
Me.[SubFormName].Form![CheckBoxName].Visible = Not
Me.[SubFormName].Form![CheckBoxName]

--
\\// Live Long and Prosper \\//
BS"D


:

Hello

I want to tick a checkbox in a subform when i click a command button on a
form but then i want to refresh the data on the database becuase once that
checkbox is ticked, then it should not show up.

i have tried to refresh the database after i manaully checked the box but
the record still came up after i navugated back and forth. Want can i do ?

please can some help ?

Thank you
 
Ad

Advertisements

G

Guest

Thanks again, i am going to try this, most appreciated

Ofer said:
In that case try this code

If not Nz(Me.[SubFormName].Form![CheckBoxName],False) Then
Me.[SubFormName].Form![CheckBoxName] = True
Me.[SubFormName].Form![CheckBoxName].Visible = False
End If

--
\\// Live Long and Prosper \\//
BS"D


Moody said:
Sorry about this ofer, i really appreciate the help but all i want to do is
make the checkbox yes because once it is yes, it will never go back to no, if
you see what i mean. which code should i use for that function.

thanks again

Ofer said:
This part
Me.[SubFormName].Form![CheckBoxName] = Not
Nz(Me.[SubFormName].Form![CheckBoxName],0)

Me.[SubFormName].Form![CheckBoxName].Visible = Not
Me.[SubFormName].Form![CheckBoxName]


should change it in every click, so if its not click it will change it to
true, and if its True, it will change it back to False, and display the chck
box again.
Change the SubFormName to the name of the SubForm control name in the main
form.
Change the CheckBoxName to the name of the Check Box

--
\\// Live Long and Prosper \\//
BS"D


:

Thanks for the response, how do i tick the checkbox in the subfrm, using a
command button in the form ?

i appreciate the response

:

if you want to Hide the check box when it equal to True the on the OnClick
event of the button, try

Me.[SubFormName].Form![CheckBoxName] = Not
Me.[SubFormName].Form![CheckBoxName]
Me.[SubFormName].Form![CheckBoxName].Visible = Not
Me.[SubFormName].Form![CheckBoxName]

--
\\// Live Long and Prosper \\//
BS"D


:

Hello

I want to tick a checkbox in a subform when i click a command button on a
form but then i want to refresh the data on the database becuase once that
checkbox is ticked, then it should not show up.

i have tried to refresh the database after i manaully checked the box but
the record still came up after i navugated back and forth. Want can i do ?

please can some help ?

Thank you
 

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