Solved

How to call a sub from another form

Posted on 2009-05-19
5
378 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
Comment Utility
first you have to make the Sub on the main form Public

Forms("NameOFMainForm").NameofSub
0
 
LVL 65

Expert Comment

by:rockiroads
Comment Utility
You could just try this

Forms!myformname.mypublicprocedure
0
 
LVL 119

Expert Comment

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

Expert Comment

by:rockiroads
Comment Utility
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
Comment Utility
hi
it's Forms!FormNameHere.SubNameHere
 
good luck
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

772 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