By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,193 Members | 1,734 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,193 IT Pros & Developers. It's quick & easy.

Altering properties of sub-form from parent

Corster
P: 36
I'm fairly new to Access, so please have patience...

I have an application that I've written to audit all of our computers, monitors etc. which also works-out the Intel processor details from the core speed and processor technology (eg. Pentium D).
I also have a field which calculates a "Score" based on RAM, CPU, HDD and FSBs.
I have two tables, Asset and Computers:
Asset contains the ID, department, user, category, make, model, serial, purch cost, purch date, invoice, disposal date and any additional values.
Computers contains the Name; McAfee Agent version; OS Vendor, Version, SP; CPU Type, Core Speed, No. Cores, No. Threads, FSB, Code Name; RAM, FSB; HDD; Office Version; VNC; Asset Number (ID); and Score.

To match these two tables, I have two forms, the Asset form is the parent, the Computers form is the sub-form.

What I'd like to do is somehow change the sub-form's Enabled property to False when the Asset.Type is not Notebook or Computer, but there is no Enabled property. How do I go about doing something to this effect?

I have tried to Dim the sub-form to a variable and set the form's controls' Enabled properties aswell to no avail.

I'm also trying to create a search tool - I have a button which should DoCMD.FindNext for txtSearch.Text in the field defined by what is selected in a combo box. That don't work iether.

PLEEEEASE could someone help!
Many thanks in advance!
Mar 29 '07 #1
Share this Question
Share on Google+
3 Replies


Rabbit
Expert Mod 10K+
P: 12,427
Subforms DO have an enabled property. Are you sure you're looking at the correct properties? The property of the subform object and not the form?
Mar 29 '07 #2

Corster
P: 36
Subforms DO have an enabled property.
Aaaah!
Me.[SubForm].Enabled = True/False

I thought the subform would have it's own separate class, not under the main form's class.
Apr 2 '07 #3

Rabbit
Expert Mod 10K+
P: 12,427
Aaaah!
Me.[SubForm].Enabled = True/False

I thought the subform would have it's own separate class, not under the main form's class.
The subform object is a container. Since it resides on the main form, it belongs to the main form.
Apr 2 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.