Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to call a sub from another form

Posted on 2009-05-19
5
Medium Priority
?
388 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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 …

610 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