Solved

Stuff I really should know !  (Call Functions etc)

Posted on 2011-02-28
4
214 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Familiarize people with the process of utilizing SQL Server views 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 Access…

895 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

12 Experts available now in Live!

Get 1:1 Help Now