INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

CheckBoxes and continuous forms

CheckBoxes and continuous forms

(OP)
Hi,
Just wanted to know if its possible to use a check box to control individual records on a continuous form. When you check it checks all the records. The checkbox is a bound control.

I have two command button to select two different forms. and I wanted to be able to select either per check box, with the other command button invisble.
This is what i have code I have used.

CODE

Private Sub PrintSch_BeforeUpdate(Cancel As Integer)
If Me.PrintSch = True Then
Me.Schedule1.Visible = True
Me.Schedule2.Visible = False
Else
Me.Schedule1.Visible = False
Me.Schedule2.Visible = True

End If
End Sub 

However it just changes both command buttons at the same time..
Any ideas would be appreciated.

Thank you.

KP

RE: CheckBoxes and continuous forms

I really don't see anything in your code that mentions check boxes or command buttons. Can you be a little more explicit for those of us who can't see your form's design?

Duane
Vevey, Switzerland
Hook'D on Access
MS Access MVP 2001-2016

RE: CheckBoxes and continuous forms

(OP)


Hi Duane,
Thanks for your reply.
The control source and name for the Checkbox is (PrintSch) and the command buttons are,
1. Schedule1
2. Schedule2

CODE

Private Sub PrintSch_BeforeUpdate(Cancel As Integer)
If Me.PrintSch = True Then
Me.Schedule1.Visible = True
Me.Schedule2.Visible = False
Else
Me.Schedule1.Visible = False
Me.Schedule2.Visible = True

End If
End Sub 

All set up on a continuous form.So when the checkbox is selected per record either Command button can be visible not both together. I have them on top of each other so only one can be seen at a time.

Thank you

RE: CheckBoxes and continuous forms

Command buttons are unbound controls so each row in your continuous form will display exactly the same. They are the same control and share the same properties. Some controls support conditional formatting so their appearance can change.

Duane
Vevey, Switzerland
Hook'D on Access
MS Access MVP 2001-2016

RE: CheckBoxes and continuous forms

You may also do yourself a favor - and to anybody who looks at your code - and use widely accepted naming conventions for naming your controls, like chkPrintSch for a checkbox, and cmdSchedule1 and cmdSchedule2 for command buttons.

Have fun.

---- Andy

There is a great need for a sarcasm font.

RE: CheckBoxes and continuous forms

You may be able to fake this, but the "buttons" would have to be side by side. You could make two text box look like a button by making it raised and locked. Then use conditional formatting to enable/disable. You can make it also "invisible" by formatting the background and foreground the same as the form color.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close