>Thanks for responding, Tom!
>
>What is the hard way?
You open the form in design view. However that only works for MDBs. You can see
Rick Fisher's Find and Replace work this way.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
What is the code for getting the list of the controls once you have the form
open in design view? You can't use:
For each Ctl In Forms("MyForm") .Controls
because the Forms collection doesn't exist when no forms are open.
Further, If whatever you know works for MDBs, does it work for ACCDBs?
>>Thanks for responding, Tom!
>>
>>What is the hard way?
>
You open the form in design view. However that only works for MDBs. You
can see
Rick Fisher's Find and Replace work this way.
>
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
On Sat, 11 Oct 2008 20:57:42 -0400, "Steve" <nonsense@nomse nse.com>
wrote:
Why would it NOT work in accdb? That's about database storage, not the
forms package.
Dim ctl As Control
Dim strFormName As String
strFormName = "_test1"
DoCmd.OpenForm strFormName, acDesign
For Each ctl In Forms(strFormNa me)
Debug.Print ctl.Name
Next
DoCmd.Close acForm, strFormName
-Tom.
Microsoft Access MVP
>Thanks for responding, Tony!
>
>What is the code for getting the list of the controls once you have the form
>open in design view? You can't use:
>For each Ctl In Forms("MyForm") .Controls
>because the Forms collection doesn't exist when no forms are open.
>
>Further, If whatever you know works for MDBs, does it work for ACCDBs?
>
>Steve
>
>
>
>"Tony Toews [MVP]" <ttoews@teluspl anet.netwrote in message
>news:t3i2f4tbb 907tf5jqhhg7luf 9i9qbanmh2@4ax. com...
>"Steve" <nonsense@nomse nse.comwrote:
>>
>>>Thanks for responding, Tom!
>>>
>>>What is the hard way?
>>
>You open the form in design view. However that only works for MDBs. You
>can see
>Rick Fisher's Find and Replace work this way.
>>
>Tony
>--
>Tony Toews, Microsoft Access MVP
> Please respond only in the newsgroups so that others can
>read the entire thread of messages.
> Microsoft Access Links, Hints, Tips & Accounting Systems at
>http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
On Oct 11, 4:52 pm, "Steve" <nonse...@nomse nse.comwrote:
What is the code to create a list of the controls on a closed form in the
current database?
>
Thanks!
>
Steve
Not quite the answer you asked for but might this work?
If you were to open the form from a program, but set it as hidden,
then you would be able to get an object with a collection of all the
controls. Once you have gotten from that what you want (made a list,
whatever) you could close the form?
>If you were to open the form from a program, but set it as hidden,
>then you would be able to get an object with a collection of all the
>controls. Once you have gotten from that what you want (made a list,
>whatever) you could close the form?
Trouble is some forms may have external dependencies such as a combo box query based
on another form. That will likely cause an error message to come up when the form
opens that you can't get around.
Thus open the form in design view.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
Thanks for responding, Tony!
>
What is the code for getting the list of the controls once you have
the form open in design view? You can't use:
For each Ctl In Forms("MyForm") .Controls
because the Forms collection doesn't exist when no forms are open.
A form opened in design view is open and therefore IS in the Forms
collection.
Further, If whatever you know works for MDBs, does it work for ACCDBs?
He didn't mean "works in MDB, not in AccDB". He meant "works in MDB, not
MDE". In this case AccDB = MDB and AccDE = MDE.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
>You open the form in design view. However that only works for MDBs.
And ACCDBs. I'm going to have to be more careful in this respect in the future.
<smile You can't open a form or report in design view in MDE or ACCDEs.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
"Tony Toews [MVP]" <ttoews@teluspl anet.netwrote in
news:t3i2f4tbb9 07tf5jqhhg7luf9 i9qbanmh2@4ax.c om:
"Steve" <nonsense@nomse nse.comwrote:
>
>>Thanks for responding, Tom!
>>
>>What is the hard way?
>
You open the form in design view.
Uh, why not just open the form in regular view? Why does it have to
be in design view? And I didn't know that the Controls collection
existed in a form open in design view.
"David W. Fenton" <XXXusenet@dfen ton.com.invalid wrote:
>Thinking through this, I wonder if anyone has a position on whether
>opening the form in data entry mode might not be just as easy as
>design mode? What advantage would there be in using design view? No
>locking?
A lot of this depends on why he is wants the control list. My assumption is that he
needs it for some of his own development requirements whatever they might be.
Therefore opening it in Edit mode saves some errors that might occur if the form was
opened in regular mode.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
Comment