Referencing Subforms in Access 2.0 -- HELP!

Referencing Subforms in Access 2.0 -- HELP!

Post by Mike Habich » Wed, 14 Jun 1995 04:00:00



Hi, all!

I'm doing development work this summer in MS Access 2.0, and part of
my project involves a many-to-many relationship which I'm displaying
using a form with an embedded subform.  Everything works reasonably well...

...except, I have several command buttons which are dependent on there
actually being a join-record between the two tables, and when there isn't,
I want these buttons to be disabled.

The only way I can think of doing this is to count the number of
records in the embedded subform, like this:

        recCount = Me![SubformControl].Form.RecordsetClone.RecordCount

I had half-expected Access to complain about an invalid use of
RecordCount or RecordsetClone, but no...

...half the time [and yes, it *is* selective!] Access reports "Invalid
reference to property 'Form'."

And then, the other half of the time, it doesn't complain.  The main form in
question has a header to it, and I'm wondering if which part has the
focus at the time I access the subform makes a difference, but the Access
documentation/help/etc makes no mention of it.  [It doesn't even mention
anything about being able to access subform properties, but I figure you
can, since whenever Access complains about the above construct, it also
chokes on references to controls on the subform as well.]

I'm at my wit's end, here, and I would really appreciate any help anyone
can give me!

Thanks in advance,
--Mike. :)
--

= Summer '95: Ottawa, Ontario -- Fall '95: Cambridge, Ontario =
= "Two men say they're Jesus / One of 'em must be wrong!"     =
=                       -- Dire Straits, "Industrial Disease" =

 
 
 

1. MS Access 2.0: Variable subforms

In MS Access 2.0, is it possible to select what subform to used at
form open time, based on the value on the record supplying the data to
the top level form?

Or do I have to create a different top level form for every
permutation of the possible subforms.

This has to do with a varying number of columns for different entries,
and I want to leave as little as possible to the judgement of the
person keying in the data (which mean I can't show all columns all of
the time).

Any tips/hints/info appreciated.

Thanx!

- Steinar

2. part time programmer position (los angeles)

3. MS Access 2.0: subforms nested more than three deep

4. Using Ingres with Delphi

5. Reference to Access 2.0 Query in VB 4.0

6. Problems to connect ERWin to Oracle8.1.5

7. Help: 2.0 : How can I capture Oracle errors in MS Access 2.0

8. DB Password - VB Code

9. Install Access 2.0 Cmpt Layer w/o Access 2.0 for VB 3.0

10. Accessing Access 2.0 database with VB3, ODBC 2.0 and Microsotf Jet Engine Compatibility Layer

11. Accessing Access 2.0 MDBs from Delphi 2.0

12. Help: Problem reading Access 2.0 mdb from VB3 under Win95/Access 7.0

13. Help : Accessing a secure access 2.0 database from VB4.0