473,387 Members | 1,530 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.

Calling Procedure on other form

I have a Form that is set to visible=false while a save confirm Form is
displayed.

When the confirmation is complete the confirm Form is closed and the hidden
form is made visible=true.

snip....

gSaved = True

DoCmd.Close
Forms!frmMain.Visible = True

.... end snip

How can I call a public procedure that is contained withing the frmMain
module from within the procedure on the confirm Form.

Is it possible? should I make the procedure a Function?

Thanks

Mike
Nov 12 '05 #1
3 10595
Mike wrote:
I have a Form that is set to visible=false while a save confirm Form is
displayed.

When the confirmation is complete the confirm Form is closed and the hidden
form is made visible=true.

snip....

gSaved = True

DoCmd.Close
Forms!frmMain.Visible = True

... end snip

How can I call a public procedure that is contained withing the frmMain
module from within the procedure on the confirm Form.

Is it possible? should I make the procedure a Function?


Create a Public Function and call call it as so:

Forms!frmMain.setValue(gSaved)

where "setValue" is the name of your public function and gSaved is the value
you want to pass to it. Unless you are expecting a returned value you could
just make this a Sub instead of a Function.
--
'-------------------------------
' John Mishefske
'-------------------------------

Nov 12 '05 #2
if you want to keep the procedure on your frmMain form then refer to the
procedure after .Visible = True, something like....

DoCmd.Close
Forms!frmMain.Visible = True
Forms![frmMain].MyProcedure

hth,
dingus


"Mike" <re******@hotmail.com> wrote in news:3f******@dnews.tpgi.com.au:
I have a Form that is set to visible=false while a save confirm Form
is displayed.

When the confirmation is complete the confirm Form is closed and the
hidden form is made visible=true.

snip....

gSaved = True
>

... end snip

How can I call a public procedure that is contained withing the
frmMain module from within the procedure on the confirm Form.

Is it possible? should I make the procedure a Function?

Thanks

Mike


Nov 12 '05 #3
Thanks

"dingusmcgee" <di**********@yahoo.com> wrote in message
news:Xn********************************@207.225.15 9.7...
if you want to keep the procedure on your frmMain form then refer to the
procedure after .Visible = True, something like....

DoCmd.Close
Forms!frmMain.Visible = True
Forms![frmMain].MyProcedure

hth,
dingus


"Mike" <re******@hotmail.com> wrote in news:3f******@dnews.tpgi.com.au:
I have a Form that is set to visible=false while a save confirm Form
is displayed.

When the confirmation is complete the confirm Form is closed and the
hidden form is made visible=true.

snip....

gSaved = True
>

... end snip

How can I call a public procedure that is contained withing the
frmMain module from within the procedure on the confirm Form.

Is it possible? should I make the procedure a Function?

Thanks

Mike

Nov 12 '05 #4

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

Similar topics

30
by: Tim Marshall | last post by:
Here's the scenario, A2003, Jet back end, illustrated with some cut down code at the end of the post: A proc dims a snapshot recordset (dim rst as Dao.recordset) and opens it. There are several...
2
by: Woody Splawn | last post by:
I am using SQL Server 2000 as the back-end. I have created a stored procedure in SQL server called usp_AddContract. This Stored procedure inserts a new contract into a contracts table. I have...
4
by: ST | last post by:
From Form1 I call a public sub in a module. The sub writes on Form1. Problem: the call creates a new Form1 and writes on it, instead of writing on the one already shown Form1. I have tried to...
4
by: Jack | last post by:
Hi, I am trying to run an example code from a book. However I am getting the following error message: Number: -2147217900 Description: Syntax error or access violation Source: Microsoft OLE...
4
by: aziz001 | last post by:
I have a form where a person can select how many of a product they want e.g. 1x2g Syringe, 15x100g jar etc. The code will then display string output in a label, listing the products that have a...
4
by: Bugs | last post by:
Hi, I wonder if anyone can help me out. I'm building a vb.net application that has a form with a panel that contains several other sub forms (as a collection of controls). What I'm wanting to...
2
by: =?Utf-8?B?YW5vb3A=?= | last post by:
Hello, I have a stored procedure named as usp_CheckLogin with two parameters as @usID, @Password also values of these parameters are to be extracted using Request.Form from the fields in...
10
by: SQACPP | last post by:
Hi, I try to figure out how to use Callback procedure in a C++ form project The following code *work* perfectly on a console project #include "Windows.h" BOOL CALLBACK...
4
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category...
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: 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:
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
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.