473,320 Members | 1,828 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,320 software developers and data experts.

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.Forms and Application.Modules 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.openModule 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.SaveAsText function to look inside the code , change it on disk
and then reeimport it with Application.LoadFromText

Could someone suggest a more elegant way?
Nov 12 '05 #1
4 2604
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******@planet.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.Forms and Application.Modules 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.openModule 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.SaveAsText function to look inside the code , change it on disk and then reeimport it with Application.LoadFromText

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********@nospam.com> wrote in message
news:9x******************@newsread1.news.atl.earth link.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******@planet.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.Forms and Application.Modules 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.openModule 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.SaveAsText function to look inside the code , change it on

disk
and then reeimport it with Application.LoadFromText

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******@planet.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********@nospam.com> wrote in message
news:9x******************@newsread1.news.atl.eart hlink.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******@planet.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.Forms and Application.Modulesbut > 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.openModule 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.SaveAsText function to look inside the code , change it on

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



Nov 12 '05 #4
On Wed, 25 Feb 2004 01:47:41 +0100, "Jelmer" <jk******@planet.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.OpenForm 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.openModule 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.SaveAsText function to look inside the code , change it on disk
and then reeimport it with Application.LoadFromText

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
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...
4
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...
8
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....
4
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,...
6
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...
3
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...
2
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...
12
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....
21
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...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.