Solved

Enabling/Disabling Buttons on Continuous Subform

Posted on 2011-03-05
5
323 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 - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now