Solved

Stuff I really should know !  (Call Functions etc)

Posted on 2011-02-28
4
217 Views
Last Modified: 2012-06-27
See attached.
Click on form "MASTER SCREEN"
Click on any "CHOOSE" button.
Error!
Sub or Function Not Defined

This function DOES exist but is not accessible from this piece of code.  (Excuse the poor technical terms).  How do I make this function accessible?

(As I say ... this is stuff I should know.  But interrmittent learning from the web, no training and nobody to ask but you guys...  this can lead to ommissions of knowledge.)

DerekImport--3-.zip
0
Comment
Question by:Patrick O'Dea
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:kelle1
ID: 34997549
Where is your function defined?  If you need it to be accessible only from the Master Screen form, you can define it there.  If it was created in another form, or other Access object, it would have to be declared as public (change Private Function at the beginning of your code to Public Function).
0
 

Author Comment

by:Patrick O'Dea
ID: 34997656
Thanks kelle1,

The function is defined as follows

Public Sub CreateAudit(ByRef AuditDetails)

It was originally created in form frmPricesBySupplier.  Therefore it should be found ??

0
 
LVL 4

Accepted Solution

by:
kelle1 earned 500 total points
ID: 34997688
I would move it to a module.  If you need to keep your frmPricesBySupplier for testing or backup purposes, copy the function to a module and change the name.  Then update your current form to call the function using the new name.
0
 

Author Closing Comment

by:Patrick O'Dea
ID: 34997856
Thanks kelle1,

I have got it now.

(You may have over estimated my knowledge ... but I have just created my first module !  All works well.)
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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