A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help Please : Checkboxes Access 2002



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2004, 06:19 PM
Mike
external usenet poster
 
Posts: n/a
Default Help Please : Checkboxes Access 2002

I have a form with two check boxes PPL & DLP both
controls are in tblReviewH1
on enabling one I want the other to disappear.
I am attempting to use Dlookup to validate the state of
the checkbox which in part works
but changes the property for nearly all the records.....
The table has a unique reference OrderNo for each record
(txt_Ono)
Is there a way that I could adapt the following code to
refer to the OrderNo
and by that get the right result

Private Sub PPL_AfterUpdate()
If DLookup("PPL = True", "tblReviewH1") Then
Me!DLP.Visible = False
Else: If DLookup("PPL = False", "tblReviewH1") Then Me!
DLP.Visible = True
End If

End Sub

Or as usual have I gone in the wrong direction

Would be very grateful if any assistance

Mike

  #2  
Old May 26th, 2004, 06:59 PM
Rick B
external usenet poster
 
Posts: n/a
Default Help Please : Checkboxes Access 2002

Not sure why you need a lookup. If both the fields are shown on your form,
just insert code in the OnExit or AfterUpdate property of the first
checkbox. If I understand, you want CheckBox2 to be hidden if Checkbox1 is
True.

Private Sub checkBox1_AfterUpdate()
If CheckBox1 then
Checkbox2.visible = False
Else Checkbox2.Visible = True
End Sub

As you move from one record to the next, you would want to perform a similar
check...

Private Sub Form_Current()

If CheckBox1 then
Checkbox2.visible = False
Else Checkbox2.Visible = True
End Sub



Rick B




"Mike" wrote in message
...
I have a form with two check boxes PPL & DLP both
controls are in tblReviewH1
on enabling one I want the other to disappear.
I am attempting to use Dlookup to validate the state of
the checkbox which in part works
but changes the property for nearly all the records.....
The table has a unique reference OrderNo for each record
(txt_Ono)
Is there a way that I could adapt the following code to
refer to the OrderNo
and by that get the right result

Private Sub PPL_AfterUpdate()
If DLookup("PPL = True", "tblReviewH1") Then
Me!DLP.Visible = False
Else: If DLookup("PPL = False", "tblReviewH1") Then Me!
DLP.Visible = True
End If

End Sub

Or as usual have I gone in the wrong direction

Would be very grateful if any assistance

Mike


  #3  
Old May 26th, 2004, 07:07 PM
Rick B
external usenet poster
 
Posts: n/a
Default Help Please : Checkboxes Access 2002

One more thought. Is this simply an option group? Where the user can check
either PPL or DLP? Sounds kinda like it. Checking PPl will uncheck DLP and
checking DLP will uncheck PPL?

Rick B


"Mike" wrote in message
...
I have a form with two check boxes PPL & DLP both
controls are in tblReviewH1
on enabling one I want the other to disappear.
I am attempting to use Dlookup to validate the state of
the checkbox which in part works
but changes the property for nearly all the records.....
The table has a unique reference OrderNo for each record
(txt_Ono)
Is there a way that I could adapt the following code to
refer to the OrderNo
and by that get the right result

Private Sub PPL_AfterUpdate()
If DLookup("PPL = True", "tblReviewH1") Then
Me!DLP.Visible = False
Else: If DLookup("PPL = False", "tblReviewH1") Then Me!
DLP.Visible = True
End If

End Sub

Or as usual have I gone in the wrong direction

Would be very grateful if any assistance

Mike


  #4  
Old May 26th, 2004, 07:54 PM
Mike
external usenet poster
 
Posts: n/a
Default Help Please : Checkboxes Access 2002

Thanks Rick

I'll get the hang of this someday.

I followed the help instructions for creating an option
group with my two check boxes..as I understand it just by
adding these check boxes to the group it should force
one box to clear if the other is checked. If I have
a conditionally formatted text box and a button in between
the check boxes but not added to the group would this
prevent the uncheck action from being applied ?

Thank you for the quick response and your help


Mike




-----Original Message-----
One more thought. Is this simply an option group?

Where the user can check
either PPL or DLP? Sounds kinda like it. Checking PPl

will uncheck DLP and
checking DLP will uncheck PPL?

Rick B


"Mike" wrote in

message
...
I have a form with two check boxes PPL & DLP both
controls are in tblReviewH1
on enabling one I want the other to disappear.
I am attempting to use Dlookup to validate the state of
the checkbox which in part works
but changes the property for nearly all the records.....
The table has a unique reference OrderNo for each record
(txt_Ono)
Is there a way that I could adapt the following code to
refer to the OrderNo
and by that get the right result

Private Sub PPL_AfterUpdate()
If DLookup("PPL = True", "tblReviewH1") Then
Me!DLP.Visible = False
Else: If DLookup("PPL = False", "tblReviewH1") Then Me!
DLP.Visible = True
End If

End Sub

Or as usual have I gone in the wrong direction

Would be very grateful if any assistance

Mike


.

  #5  
Old May 26th, 2004, 09:55 PM
Rick B
external usenet poster
 
Posts: n/a
Default Help Please : Checkboxes Access 2002

No, as long as they are added as option boxes, it does not matter how far
apart, or what is in between. I have not used option buttons much, and
don't know if they can be bound to a field in a table. If not, then you may
have to use code similar to my first post.



Rick B


"Mike" wrote in message
...
Thanks Rick

I'll get the hang of this someday.

I followed the help instructions for creating an option
group with my two check boxes..as I understand it just by
adding these check boxes to the group it should force
one box to clear if the other is checked. If I have
a conditionally formatted text box and a button in between
the check boxes but not added to the group would this
prevent the uncheck action from being applied ?

Thank you for the quick response and your help


Mike




-----Original Message-----
One more thought. Is this simply an option group?

Where the user can check
either PPL or DLP? Sounds kinda like it. Checking PPl

will uncheck DLP and
checking DLP will uncheck PPL?

Rick B


"Mike" wrote in

message
...
I have a form with two check boxes PPL & DLP both
controls are in tblReviewH1
on enabling one I want the other to disappear.
I am attempting to use Dlookup to validate the state of
the checkbox which in part works
but changes the property for nearly all the records.....
The table has a unique reference OrderNo for each record
(txt_Ono)
Is there a way that I could adapt the following code to
refer to the OrderNo
and by that get the right result

Private Sub PPL_AfterUpdate()
If DLookup("PPL = True", "tblReviewH1") Then
Me!DLP.Visible = False
Else: If DLookup("PPL = False", "tblReviewH1") Then Me!
DLP.Visible = True
End If

End Sub

Or as usual have I gone in the wrong direction

Would be very grateful if any assistance

Mike


.



  #6  
Old May 27th, 2004, 07:01 AM
Mike
external usenet poster
 
Posts: n/a
Default Help Please : Checkboxes Access 2002

Thanks again for your help

Mike


-----Original Message-----
No, as long as they are added as option boxes, it does

not matter how far
apart, or what is in between. I have not used option

buttons much, and
don't know if they can be bound to a field in a table.

If not, then you may
have to use code similar to my first post.



Rick B


"Mike" wrote in

message
...
Thanks Rick

I'll get the hang of this someday.

I followed the help instructions for creating an option
group with my two check boxes..as I understand it just by
adding these check boxes to the group it should force
one box to clear if the other is checked. If I have
a conditionally formatted text box and a button in

between
the check boxes but not added to the group would this
prevent the uncheck action from being applied ?

Thank you for the quick response and your help


Mike




-----Original Message-----
One more thought. Is this simply an option group?

Where the user can check
either PPL or DLP? Sounds kinda like it. Checking PPl

will uncheck DLP and
checking DLP will uncheck PPL?

Rick B


"Mike" wrote in

message
.. .
I have a form with two check boxes PPL & DLP both
controls are in tblReviewH1
on enabling one I want the other to disappear.
I am attempting to use Dlookup to validate the state of
the checkbox which in part works
but changes the property for nearly all the records.....
The table has a unique reference OrderNo for each record
(txt_Ono)
Is there a way that I could adapt the following code to
refer to the OrderNo
and by that get the right result

Private Sub PPL_AfterUpdate()
If DLookup("PPL = True", "tblReviewH1") Then
Me!DLP.Visible = False
Else: If DLookup("PPL = False", "tblReviewH1") Then Me!
DLP.Visible = True
End If

End Sub

Or as usual have I gone in the wrong direction

Would be very grateful if any assistance

Mike


.



.

  #7  
Old May 27th, 2004, 04:30 PM
Chris Nebinger
external usenet poster
 
Posts: n/a
Default Help Please : Checkboxes Access 2002

They can be bound to a field, but they only return back
numbers in the Value property of each option. If that
works for you, than you can bind it...Otherwise, see
Rick's code.


Chris Nebinger


-----Original Message-----
Thanks again for your help

Mike


-----Original Message-----
No, as long as they are added as option boxes, it does

not matter how far
apart, or what is in between. I have not used option

buttons much, and
don't know if they can be bound to a field in a table.

If not, then you may
have to use code similar to my first post.



Rick B


"Mike" wrote in

message
.. .
Thanks Rick

I'll get the hang of this someday.

I followed the help instructions for creating an option
group with my two check boxes..as I understand it just by
adding these check boxes to the group it should force
one box to clear if the other is checked. If I have
a conditionally formatted text box and a button in

between
the check boxes but not added to the group would this
prevent the uncheck action from being applied ?

Thank you for the quick response and your help


Mike




-----Original Message-----
One more thought. Is this simply an option group?

Where the user can check
either PPL or DLP? Sounds kinda like it. Checking PPl

will uncheck DLP and
checking DLP will uncheck PPL?

Rick B


"Mike" wrote in

message
. ..
I have a form with two check boxes PPL & DLP both
controls are in tblReviewH1
on enabling one I want the other to disappear.
I am attempting to use Dlookup to validate the state of
the checkbox which in part works
but changes the property for nearly all the records.....
The table has a unique reference OrderNo for each record
(txt_Ono)
Is there a way that I could adapt the following code to
refer to the OrderNo
and by that get the right result

Private Sub PPL_AfterUpdate()
If DLookup("PPL = True", "tblReviewH1") Then
Me!DLP.Visible = False
Else: If DLookup("PPL = False", "tblReviewH1") Then Me!
DLP.Visible = True
End If

End Sub

Or as usual have I gone in the wrong direction

Would be very grateful if any assistance

Mike


.



.

.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.