Solved

Enabling/Disabling Buttons on Continuous Subform

Posted on 2011-03-05
5
341 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 85

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

691 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