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

Sharing variables/objects between two open .mdb files

I have a system that uses two .mdb files that are open at the same
time, App1.mdb and App2.mdb.
At the time that App2 is launched by App1, App1 remains open with a
form (and table) already loaded and showing, "frm1".

In App1, frm1 has a textbox called txtPgmPath.
App2.mdb needs the variable from txtPgmPath in Frm1/App1.

I havn't tried this before in VBA, but over in App2, is it possible to
reference the value of a control in an open form in another open .mdb
file?

Also, without the need to necessarily link other objects, is it
possible to reference another table/column or report object, et al in
a 2nd .mdb while it is open?

If someone can point me to a code sample that would be helpful.

.....thank you for the assistance.

Jul 24 '07 #1
2 1865
If txtPgmPath isn't currently bound, create a table in App1 and bind it to
field PgmPath. Link to the table from App2. Then the value is right there
for use, no automation required.

<rl*********@yahoo.comwrote in message
news:11**********************@m3g2000hsh.googlegro ups.com...
>I have a system that uses two .mdb files that are open at the same
time, App1.mdb and App2.mdb.
At the time that App2 is launched by App1, App1 remains open with a
form (and table) already loaded and showing, "frm1".

In App1, frm1 has a textbox called txtPgmPath.
App2.mdb needs the variable from txtPgmPath in Frm1/App1.

I havn't tried this before in VBA, but over in App2, is it possible to
reference the value of a control in an open form in another open .mdb
file?

Also, without the need to necessarily link other objects, is it
possible to reference another table/column or report object, et al in
a 2nd .mdb while it is open?

If someone can point me to a code sample that would be helpful.

....thank you for the assistance.

Jul 25 '07 #2
lyle <ly************@gmail.comwrote:
>This gets the text in TextBox Text0 in Form1 in DB1 from code in DB2.
That's pretty cool. I can see that being useful for running reports out of an MDB
from an MDE.

Thanks, 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/
Jul 26 '07 #3

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

Similar topics

1
by: Mladen Gogala | last post by:
How can I share variables between two processes? Here is my problem? File test1.php: ------------------------------------------------------------------- <?php session_start(); $var1="This...
3
by: Alex | last post by:
Hi all, I want to write a "File sharing system". Is posssible with socket and thread create multisuer connection at the same time ? or is wrong my idea?? thanks
0
by: Marco | last post by:
Hello everybody, I have a little Access application that is composed by two MDB files. I have stored the tables in the first MDB file, and the other objects (forms, reports, queries, etc.) in the...
4
by: abcd | last post by:
I have an ASP application. It instantiaties some COM components and we put those COM components in Session variables...COM components have license restrictions...We have written new ASPX page ( for...
1
by: David Belohrad | last post by:
Dear All, could someone give a hint? I'd like to share the resources as follows: A shared class which works as counter of number of shared resources: class Shared { public: Q_PCBShared()...
10
by: shantanu | last post by:
Hi, How can we declare a static variable or function declared in one source file, which is to be used in other source file?
0
by: noah.blumenthal | last post by:
I have created an application that uses 3 parts: 1) a windows service that distributes email 2) a form that configures the settings (incoming address, outgoing address, etc) for that service and 3)...
6
by: sekhar123276 | last post by:
Hi, I want to declare objects that several source files can use.(similar to C++ extern storage class specifier ). I know that I can pass ref to every single object(winforms) will do but I was...
6
by: awhan.iitk | last post by:
I have a set of variables that I want to share across mulitple c++ files. I was using the extern method so far. Is there any other way to do the same. The variables are not constants and I get the...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.