Solved

Stuff I really should know !  (Call Functions etc)

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

706 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

18 Experts available now in Live!

Get 1:1 Help Now