Solved

Stuff I really should know !  (Call Functions etc)

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access report groups with sums 5 29
User Level Security 6 38
Problem copying record details to a new record 5 9
Combo Box with a control source is "locked" 10 9
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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.

822 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