Solved

Running a procedure from anothe unrelated form

Posted on 2016-10-09
5
40 Views
Last Modified: 2016-10-09
I am using this. It does not work. Tried all manor of combinations

Call Me.Forms.[ProjectForm].[Details].Form.DuplicateRecordQueryWithSets

DuplicateRecordQueryWithSets     is the procedure
0
Comment
Question by:DatabaseDek
  • 2
  • 2
5 Comments
 
LVL 25

Expert Comment

by:Pawan Kumar
ID: 41835871
What error is coming? DuplicateRecordQueryWithSets is a procedure written in which database ?
0
 

Author Comment

by:DatabaseDek
ID: 41835874
Method or Data not found with "Forms." Highlighted

Same database
0
 
LVL 19

Accepted Solution

by:
crystal (strive4peace) - Microsoft MVP, Access earned 500 total points
ID: 41835878
if you are using an absolute reference to the procedure, don't start with Me
   Call Forms.f_Master.f_Child.Form.ProcedureName

Open in new window


make sure the procedure is PUBLIC that you are calling. For instance:
Public Sub ProcedureName()
   'code goes here
End Sub

Open in new window

if you are calling this from code behind the master form, you can do this:
      Call Me.f_Child.Form.ProcedureName

Open in new window

0
 

Author Closing Comment

by:DatabaseDek
ID: 41836014
I had brackets around form names.

Thank you
0
 
LVL 19
ID: 41836019
you're welcome ~ happy to help
actually the problem with the example was that it was "Me.Forms..." instead of "Forms..."
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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
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…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

863 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

20 Experts available now in Live!

Get 1:1 Help Now