Solved

How to call a sub from another form

Posted on 2009-05-19
5
379 Views
Last Modified: 2012-05-07
In Access 2000 I am on a pop up form and want to call a Sub (Public) on my main form.  What is the correct syntax please?  (Off to a rough start this morning....)
0
Comment
Question by:snyperj
  • 2
  • 2
5 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 24421622
first you have to make the Sub on the main form Public

Forms("NameOFMainForm").NameofSub
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24421632
You could just try this

Forms!myformname.mypublicprocedure
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 24421702
btw, the Main form must also be open to make the call to the Public Sub successful
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24421880
synperj, just curious, did what I post work? posted at the same time as cap, just beaten by secs, that cap is a quick typer :)
0
 
LVL 12

Expert Comment

by:ErezMor
ID: 24421950
hi
it's Forms!FormNameHere.SubNameHere
 
good luck
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now