473,386 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Unable to access properties or methods of subform's controls

I am extending an existing Access/VBA app and need to update a subform
displayed in continuous view within a containing form. The existing
form and subform have worked fine to date with the subform's
RecordSource set to an underlying DB table.

To extend the existing app, I need to add controls to the subform and
set their Text values etcetera at runtime. (Clearly if a single
RecordSource would do the trick, I would extend the underlying table
and bind its new fields to the subform's new controls, but that's not
an option here.) I thought the subform's initialization or loading
subroutines would be natural places for code to set the subform's
controls' properties. However, this approach produces an error
stating that I cannot access a control's properties or methods while
it doesn't have the focus.

Obviously assigning values to controls' properties in its form's
initialization, loading, or opening code can work. There are forms in
VB(A) apps before me with this sort of code, and it works just fine.
(...open to the suggestion this isn't ideal, though.) Does anyone
know why this approach doesn't seem to work in a form's code when the
form is a subform? (Note that I _am_not_ trying to assign values to
the subform's controls in its _containing_ form's code.)

Thanks, y'all! I hope someone out there can cut through my confusion,
because I really need an informed VB programmer's help right now! :-)

Joe Egan
Jul 17 '05 #1
0 2321

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Joseph J. Egan | last post by:
I am extending an existing Access/VBA app and need to update a subform displayed in continuous view within a containing form. The existing form and subform have worked fine to date with the...
8
by: deko | last post by:
I'm hoping someone can sanity check my understanding of the Object Model for Forms/Controls. I'm having trouble drilling down into Control properties. First, I have a record set with the...
8
by: William Bradley | last post by:
First of all I have been working with Access 97 and this morning the owner of the business phoned me to inform me that he had updated to Access 2000 and parts of my forms would not work anymore. ...
1
by: J | last post by:
Hi, Ive got 3 forms, (a subform within a subform within a form) and when I refresh the outermost form, Access closes and offers to send an error report. The forms worked fine a few weeks ago,...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
2
by: paul meaney | last post by:
All, myself and another developer have been staring blankly at a screen for the past 48 hours and are wondering just what stunningly obvious thing we are missing. We are trying to load up 2...
5
by: djscratchnsniffing | last post by:
i know you can access an ascx's properties/methods from an aspx file. Let's say you have an aspx file with two code-behind files(ascx files). Can you access one of the ascx file's...
3
by: Mick | last post by:
Hi, Dragging & Dropping my ascx control in my aspx page, I just wanna know how I can access its properties when validating the form ? The control is composed of 4 controls (2 txtbox and 2 dropdown...
7
by: Andy B | last post by:
I have a class I am creating for data access. I need to access controls from inside the class that are on a particular page. How do I do this? or is creating an instance of the page class and using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.