Is the "with" reference method gone?

  • Thread starter Thread starter Allen Browne
  • Start date Start date
A

Allen Browne

The With line must specify an object, and the references inside the with
block can be to members/properties of that reference.

For example:
With Me
.Control1.Enabled = False
...
 
With was new in A95, not A2.

Just because the VBA Help index is full of holes doesn't
mean the content isn't there. In this case, the Help topic
is easy to find by starting on the Contents tab and looking
in the Statements chapter.
 
I thought that one could refer to groups or collections of things and their
properties using "with" in VBA, as in:

If me.newrecord = true then
with
me.control1
me.control2
me.control3
me.control4
enabled = false
....etc.

All I get is error messages, and I can't find any online help for "with"

Is the whole "with" thing gone, or am I making all of it up in my head?

Thanks for the help, everyone
 
Ohhhhh, OK, I just had the syntax wrong. I was surprised to not see any
reference to this in Help, as I believe I found out about it in Access 2.0's
Help years ago.

Thanks Allen
 
Back
Top