Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

Stuff I really should know ! (Call Functions etc)

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
Patrick O'Dea
Asked:
Patrick O'Dea
  • 2
  • 2
1 Solution
 
kelle1Commented:
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
 
Patrick O'DeaAuthor Commented:
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
 
kelle1Commented:
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
 
Patrick O'DeaAuthor Commented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now