Solved

How to call a sub from another form

Posted on 2009-05-19
5
383 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 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

761 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