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

Raise Event from referenced mdb to Main.mdb

I referenced an mdb file to the main db using Tools -> Reference in the
VBA Editor of the main mdb.

I am able to open and use the forms in the referenced program, via a
public sub that resides in a standard modual in the referenced program.

My problem is catching an event when the user clicks a button on a form
in the referenced program, and responding to the event in the main
program.

Since the class objects of the referenced program doesn't seem to be
visible to the main program; is there any way around this for sending
back events to the main program?

Mar 6 '06 #1
1 3175
You can Run or Eval functions in the main program, or in other
loaded references.

But I also wonder about the design of your program. I almost
never call down the chain.

It is not considered bad practice because it is difficult
to implement: rather, the implementation is not obvious
because it is considered bad practice.

BTW, you can pass form and other objects back and forth,
and the application.forms collection (all open forms) is
visible everywhere.

(david)

"Jonathan" <go****@jbmail.co.uk> wrote in message
news:11*********************@v46g2000cwv.googlegro ups.com...
I referenced an mdb file to the main db using Tools -> Reference in the
VBA Editor of the main mdb.

I am able to open and use the forms in the referenced program, via a
public sub that resides in a standard modual in the referenced program.

My problem is catching an event when the user clicks a button on a form
in the referenced program, and responding to the event in the main
program.

Since the class objects of the referenced program doesn't seem to be
visible to the main program; is there any way around this for sending
back events to the main program?

Mar 7 '06 #2

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

Similar topics

4
by: Eric | last post by:
How can I dynamically assign an event to an element? I have tried : (myelement is a text input) document.getElementById('myelement').onKeyUp = "myfnc(param1,param2,param3)"; ...
2
by: (Pete Cresswell) | last post by:
I've been perusing a "real-life" application and notice that for instance, in a button's Click() event, they don't write the processing code. Instead, they raise an event like AddNewRecord and...
2
by: ZAky | last post by:
Why do I get a System.NullReferenceException for this script? I added the following script to a simple form with a button. <Script> public event EventHandler DoThis; static void Main() {...
5
by: Mark Overstreet | last post by:
I am writing an app that needs to contain an object model that allows it to be controlled similiar to something like Word. However, I am writing this in C# and all managed code. I know that I can...
4
by: Charles Law | last post by:
Suppose a worker thread needs to signal to the main thread that an event has occurred. Ordinarily, any event raised by the worker thread will be on its own thread. How can the worker thread...
3
by: moondaddy | last post by:
I wrote my own List class which I use to bind to list controls. this class inherits CollectionBase and implements IBindingList. This class contains a list of business classes such as customers...
0
by: Achim Domma (SyynX Solutions GmbH) | last post by:
Hi, in my application I suddenly get the error: "An error has occurred because a control with auto-generated id 'main:institutionManagement:institutionOverview' could not be located to raise...
2
by: tony | last post by:
Hello !! I have a question about event. This small program below is taken from the internet and I wonder if there are any advantage to use this Onxxx in this case it's OnEventSeven instead of...
1
by: John Dann | last post by:
VB.Net 2005: I have a class that performs some functions and then needs to update some labels on the main form (from which it is called) with several pieces of information, some text, some...
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...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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...

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.