473,761 Members | 5,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

referencing forms / modules without opening them

Hi I've been trying to create an addin similar to Find & Replace from Rick
Fisher that looks thru your tables / queries / forms / modules etc.. for a
reference to a string and optionally let's you replace it.

In order to get this to work I need to get

- the tablenames and columnnames
- the queries in plaintext
- the properties of a form and the properties of elements contained within
it
- the sourcecode in the various vb modules formmodules and classmodules

I found out that for queries and tables this is fairly simple using DAO

However things get's a bit daunting with forms and modules since I can't
seem to find a way to access these objects without opening them

You can reference stuff thru Application.For ms and Application.Mod ules but
these only contain the currently opened forms / modules and I need *all*
forms

CurrentProject. AllForms lists all forms but returns only AccessObject's
which basicly means I can only get the name of form and if it's been loaded.
But I can't reference it without loading it which is well let me say pretty
anoying

I know I can do

DoCmd.OpenForm formName, , , , , acHidden

and then later close it, but that seems rather hackish and has some problems

For modules things get even more messy since I don't think you can open a
module in hidden mode, So when I open the form with DoCmd.openModul e the vba
environment pops up. not very elegant.. to say the least

The only workaround I've found sofar is using the *shrug* undocumented
Application.Sav eAsText function to look inside the code , change it on disk
and then reeimport it with Application.Loa dFromText

Could someone suggest a more elegant way?
Nov 12 '05 #1
4 2628
A rather good utility which does this is Speed Ferret by Black Moshannon.
While not free, its cost is probably less than a reasonable rate for your
development times the hours you'll spend on it.
If I recall correctly, it does actually open all your forms & modules, but
it's got some good tricks for keeping them hidden.

HTH
- Turtle

"Jelmer" <jk******@plane t.nl> wrote in message
news:c1******** **@reader10.wxs .nl...
Hi I've been trying to create an addin similar to Find & Replace from Rick
Fisher that looks thru your tables / queries / forms / modules etc.. for a
reference to a string and optionally let's you replace it.

In order to get this to work I need to get

- the tablenames and columnnames
- the queries in plaintext
- the properties of a form and the properties of elements contained within
it
- the sourcecode in the various vb modules formmodules and classmodules

I found out that for queries and tables this is fairly simple using DAO

However things get's a bit daunting with forms and modules since I can't
seem to find a way to access these objects without opening them

You can reference stuff thru Application.For ms and Application.Mod ules but
these only contain the currently opened forms / modules and I need *all*
forms

CurrentProject. AllForms lists all forms but returns only AccessObject's
which basicly means I can only get the name of form and if it's been loaded. But I can't reference it without loading it which is well let me say pretty anoying

I know I can do

DoCmd.OpenForm formName, , , , , acHidden

and then later close it, but that seems rather hackish and has some problems
For modules things get even more messy since I don't think you can open a
module in hidden mode, So when I open the form with DoCmd.openModul e the vba environment pops up. not very elegant.. to say the least

The only workaround I've found sofar is using the *shrug* undocumented
Application.Sav eAsText function to look inside the code , change it on disk and then reeimport it with Application.Loa dFromText

Could someone suggest a more elegant way?

Nov 12 '05 #2
Yes I knew about speed ferret before starting this endevour and though I
like it I thought the $199 pricetag was a bit steep. So I decided to write
my own, It shouldn't be too hard afterall right? To me writing this is just
a way of getting reaquainted with access since the last time I used it for
anything serious was eh well quite some time ago. So time spent isn't really
an issue

"MacDermott " <ma********@nos pam.com> wrote in message
news:9x******** **********@news read1.news.atl. earthlink.net.. .
A rather good utility which does this is Speed Ferret by Black Moshannon.
While not free, its cost is probably less than a reasonable rate for your
development times the hours you'll spend on it.
If I recall correctly, it does actually open all your forms & modules, but
it's got some good tricks for keeping them hidden.

HTH
- Turtle

"Jelmer" <jk******@plane t.nl> wrote in message
news:c1******** **@reader10.wxs .nl...
Hi I've been trying to create an addin similar to Find & Replace from Rick Fisher that looks thru your tables / queries / forms / modules etc.. for a reference to a string and optionally let's you replace it.

In order to get this to work I need to get

- the tablenames and columnnames
- the queries in plaintext
- the properties of a form and the properties of elements contained within it
- the sourcecode in the various vb modules formmodules and classmodules

I found out that for queries and tables this is fairly simple using DAO

However things get's a bit daunting with forms and modules since I can't
seem to find a way to access these objects without opening them

You can reference stuff thru Application.For ms and Application.Mod ules but these only contain the currently opened forms / modules and I need *all*
forms

CurrentProject. AllForms lists all forms but returns only AccessObject's
which basicly means I can only get the name of form and if it's been

loaded.
But I can't reference it without loading it which is well let me say

pretty
anoying

I know I can do

DoCmd.OpenForm formName, , , , , acHidden

and then later close it, but that seems rather hackish and has some

problems

For modules things get even more messy since I don't think you can open a module in hidden mode, So when I open the form with DoCmd.openModul e the

vba
environment pops up. not very elegant.. to say the least

The only workaround I've found sofar is using the *shrug* undocumented
Application.Sav eAsText function to look inside the code , change it on

disk
and then reeimport it with Application.Loa dFromText

Could someone suggest a more elegant way?


Nov 12 '05 #3
You might be able to use API calls to hide the window(s) related to
the VBA IDE.

On Wed, 25 Feb 2004 12:08:33 +0100, "Jelmer" <jk******@plane t.nl>
wrote:
Yes I knew about speed ferret before starting this endevour and though I
like it I thought the $199 pricetag was a bit steep. So I decided to write
my own, It shouldn't be too hard afterall right? To me writing this is just
a way of getting reaquainted with access since the last time I used it for
anything serious was eh well quite some time ago. So time spent isn't really
an issue

"MacDermott " <ma********@nos pam.com> wrote in message
news:9x******* ***********@new sread1.news.atl .earthlink.net. ..
A rather good utility which does this is Speed Ferret by Black Moshannon.
While not free, its cost is probably less than a reasonable rate for your
development times the hours you'll spend on it.
If I recall correctly, it does actually open all your forms & modules, but
it's got some good tricks for keeping them hidden.

HTH
- Turtle

"Jelmer" <jk******@plane t.nl> wrote in message
news:c1******** **@reader10.wxs .nl...
> Hi I've been trying to create an addin similar to Find & Replace fromRick > Fisher that looks thru your tables / queries / forms / modules etc.. fora > reference to a string and optionally let's you replace it.
>
> In order to get this to work I need to get
>
> - the tablenames and columnnames
> - the queries in plaintext
> - the properties of a form and the properties of elements containedwithin > it
> - the sourcecode in the various vb modules formmodules and classmodules
>
> I found out that for queries and tables this is fairly simple using DAO
>
> However things get's a bit daunting with forms and modules since I can't
> seem to find a way to access these objects without opening them
>
> You can reference stuff thru Application.For ms and Application.Mod ulesbut > these only contain the currently opened forms / modules and I need *all*
> forms
>
> CurrentProject. AllForms lists all forms but returns only AccessObject's
> which basicly means I can only get the name of form and if it's been

loaded.
> But I can't reference it without loading it which is well let me say

pretty
> anoying
>
> I know I can do
>
> DoCmd.OpenForm formName, , , , , acHidden
>
> and then later close it, but that seems rather hackish and has some

problems
>
> For modules things get even more messy since I don't think you can opena > module in hidden mode, So when I open the form with DoCmd.openModul e the

vba
> environment pops up. not very elegant.. to say the least
>
> The only workaround I've found sofar is using the *shrug* undocumented
> Application.Sav eAsText function to look inside the code , change it on

disk
> and then reeimport it with Application.Loa dFromText
>
> Could someone suggest a more elegant way?
>
>



Nov 12 '05 #4
On Wed, 25 Feb 2004 01:47:41 +0100, "Jelmer" <jk******@plane t.nl> wrote:
Hi I've been trying to create an addin similar to Find & Replace from Rick
Fisher that looks thru your tables / queries / forms / modules etc.. for a
reference to a string and optionally let's you replace it.

In order to get this to work I need to get

- the tablenames and columnnames
- the queries in plaintext
- the properties of a form and the properties of elements contained within
it
- the sourcecode in the various vb modules formmodules and classmodules
....I know I can do

DoCmd.OpenFo rm formName, , , , , acHidden

and then later close it, but that seems rather hackish and has some problems
Definitely problematic in that form, but not so bad if you specify design mode
for opening. That is, in fact, what Speed Ferret and other similar tools do
to search forms and reports. If you use design view, then the only issue is
to make sure all forms and reports are closed before you run the code.
For modules things get even more messy since I don't think you can open a
module in hidden mode, So when I open the form with DoCmd.openModul e the vba
environment pops up. not very elegant.. to say the least

The only workaround I've found sofar is using the *shrug* undocumented
Application.Sa veAsText function to look inside the code , change it on disk
and then reeimport it with Application.Loa dFromText

Could someone suggest a more elegant way?


The VBIDE library appears to allow working with modules without opening editor
windows.

Nov 12 '05 #5

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

Similar topics

0
980
by: amber | last post by:
Help! In my project, I have a 'navigation' form that opens first, and from there the user chooses from multiple 'modules'. Each module has a 'main' form that contains a menu to open many different forms and reports. Now I have the first 'navigation' form set as the parent form, with each module's main form opening as a child. Now my problem is, logically, all my main 'module' forms should be parents
4
1518
by: Randell D. | last post by:
Folks, I have a javascript function which is a popup - It contains a list in form tags - When the user selects a value in the popup, and clicks submit, I want the values to be transfered to the parent opening window. I have managed this when I know the name of the parent window - however there are two or three different 'parent' forms with different form names that could reference this popup session meaning my current solution only...
8
1695
by: J. Black | last post by:
Hello everyone - I've been developing an incident tracking and reporting system for an emergency services outfit that I work with part time. It's going well, except for one fly in the ointment. The situation is this - I have a dispatch form that is used by dispatchers to track incidents. An incident number is automatically assigned with an AutoNumber field once a dispatcher initiates an incident by opening the dispatch form. I have...
4
1850
by: mplogue | last post by:
I have a form (frmMain) with a subform (frmSub), each with enumerated fields of the same name (txt1, txt2, etc). I'm trying to make a function that will take the values for each field in frmMain, and put them in the same-named field in the subform. Here's the function: '--------Start Code-------- Function cmdFillSub() Dim i As Integer
6
1591
by: Charles Kincaid | last post by:
I have a project that is working fine: Compiles fine, and runs fine. 13 forms and 3 modules, besides Assembly. It is a smart device (Pocket PC) app. Often some of my forms will NOT open in the designer. In solution explorer the show just like regular modules. When I load the project everthing opens up just like I left it. In fact two of my forms are OPEN in the designer even though solution explorer shows those two wrongly.
3
2787
by: Shawn | last post by:
I am working on an app where the main page uses tabs and then within each tab there are radio buttons on the top to open MDI children forms. The issue is that these MDI Child forms open kind of slowly. They seem to be spending a lot of time drawing the controls and they sort of "fade up" when opening. Anybody have any ideas as to how to improve the performance?
2
4076
by: Axel | last post by:
Hi, a question about something that seems very simple at first glance: is it possible to reference other controls of a subform in a query window without referencing through the parent form? I want to do this as I want to use same subform on two different parent forms. Main problem is that the subform is not part of the forms collection. The only workaround I found was setting the query in code in the
12
11108
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms. Here is a newbie mistake that I found myself doing (as a newbie), and that even a master programmer, the guru of this forum, Jon Skeet, missed! (He knows this I'm sure, but just didn't think this was my problem; LOL, I am needling him) If...
21
3381
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters a zipcode that is unknown this form will open. I don't want users to modify any of this customers data until they close the zipcode form. Normally this can accomplished using a modal form, however this prevents me from opening a new copy of...
0
9554
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10136
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.