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

Can't hide code in app variable...

Hello

I have a variable dim'd as an Access.Application. I have a routine that
adds a few lines of code in a module to another database. But when I open
the module from the app variable, that code window is visible! I've used
the app.visible = false, but that doesn't work. The app.docmd.openmodule
doesn't have a hidden parameter like forms and reports. How do I keep the
code window from popping up?

Here's what I've got:

dim app as Access.Applicaiton
dim sClassName as string

sclassname = "MyClass"

Set app = new Access.Application
App.Visible = False
App.OpenCurrentDatabase <dbname>
App.Visible = False

App.DoCmd.OpenModule sClassName
With App.Modules(sClassName)
.DeleteLines 1, .CountOfLines
.AddFromFile <filename>
End With
App.DoCmd.Save acModule, sClassName
App.DoCmd.Close acModule, sClassName, acSaveNo

I've tried using a module variable, using the acSaveYes option, adding
"app.visible = false" before every line, nothing seems to work.

Any ideas?

Thanks.

Matthew Wells
MW****@FirstByte.net

Nov 25 '06 #1
1 1526
Matthew Wells wrote:
How do I keep the
code window from popping up?
The best way is to save the inserted code in a module in a template database
beforehand, then use TransferDatabase to export the module from the template
database to the target database and the user won't see it happening in the
background. Another way is to set Echo off when the other database opens so
the screen doesn't update during the insertion, but the user will still see
*something,* just not the text you're inserting.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200611/1

Nov 25 '06 #2

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

Similar topics

13
by: genetic.error | last post by:
I'm moving from Vb6 to VB.Net. I have a feeling this has come up before... The VS.Net MSDN file seems to state that the following should work: Form1.Show Form1.Visible = True Form1.Hide...
22
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete...
5
by: Steven | last post by:
I'm using C# as code-behind for my aspx pages. How can I bind pages.. so that both the pages can use the functions, variables, controls .. between each other. eg., if I declare function scope()...
4
by: Steve Lewis - Website Nation | last post by:
In Classic ASP, if I wanted to show or hide a section of a page, I could simply do: <% If Variable = X Then %> <p> Html or anything else to hide here </p> <% End If %> What is the best...
7
by: FP | last post by:
I'm new to Java Script. I'm displaying comments people have made. Below each persons' comment I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would display an empty text field...
3
by: toodi4 | last post by:
I'm using a javascript that hides and unhides text based on a button click. It works great across static fields on a form. The problem I have is that I'm trying to hide and unhide various fields...
6
by: michael941 | last post by:
Hi, I have 2 tables in an html page. I have div them separately and id them as id1 and id2. I have a link there. What I need is click the link to hide one table and show the other and verse when...
16
by: mj.redfox.mj | last post by:
Can anyone help? I have a textbox which I'm programatically adding by using the following code: txtTest = New TextBox txtTest.ID = "txtLeft" + cntCount.ToString...
5
by: Mahendra Kumar Kutare | last post by:
I am trying to implement a webserver with boss-worker model thread pool implementation - I have a header declaration threadpool.h as - typedef struct threadpool_work { void (*routine) ();...
5
by: Mike P | last post by:
How would I show or hide a div that is using client side Javascript based upon a server side variable? Here are my divs : <div id="idButton5" class="otherLeftBarLink" onmouseover="javascript:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.