Solved

Enabling/Disabling Buttons on Continuous Subform

Posted on 2011-03-05
5
328 Views
Last Modified: 2013-11-05
Please see image to help visualize issue.

I have a continous subform (two records displayed in below image), I will sometimes need the "Create/View/Clear" buttons enabled and disabled based on the specific record data.  It appears though, that that buttons on a continuous report can't be enabled/disabled based on a record - instead if one record has the "create" button disabled, they all do on the continous form.  

Can buttons be enabled/disabled based ona record?  
ee-subform-.jpg
0
Comment
Question by:gcgcit
5 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 167 total points
ID: 35044370
"Can buttons be enabled/disabled based ona record?  "

No.  Not possible on a continuous form.

The next best thing is to use Conditional Formatting (CF).

If you use a label instead of a button then you can use CF on the label and that means you can enable/disable the label on a record by record basis.
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 167 total points
ID: 35044491
I think Peter met to say use Textbox, since Labels do not support Conditional Formatting.  Text boxes support CF.  So, with CF ... you can set a condition to Enable/Disable the text box 'button' (see image for example). Using the text box properties, you can sort of make a text box look like a button.

Based on the 'view' you show above, I would suggest using a Single Form View instead of continuous, that way you can Enable/Disable controls in the Form Current Event - based on whatever conditions.

mx
Capture1.gif
0
 
LVL 77

Expert Comment

by:peter57r
ID: 35045167
Thanks mx - you're right.
I sometimes use a label to get a coloured 'button' and was confusing the two situations.
Textbox with CF it should be.
0
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 166 total points
ID: 35045964
You could also include the buttons on the Main form and use code to work with the data on the subform, if that makes more sense.
0
 

Author Closing Comment

by:gcgcit
ID: 35083591
Ended-up locking and unlocking the  on variables on the specific record.

Thanks to all the experts who provided suggestions, they all built towards me coming up with a solution.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question