Solved

Invalid use of Me keyword

Posted on 2015-01-04
2
109 Views
Last Modified: 2015-01-05
My database won't compile because of this line...

    strSQL = "SELECT DISTINCT tblLOCALTempDrChromoPatientAndMedImport.ChronoID, tblLOCALTempDrChromoPatientAndMedImport.Class FROM tblLOCALTempDrChromoPatientAndMedImport WHERE tblLOCALTempDrChromoPatientAndMedImport.ChronoID = '" & Me.txtChronoID & "'"

It says "Invalid use of me keyword"

??
0
Comment
Question by:SteveL13
2 Comments
 
LVL 39

Accepted Solution

by:
als315 earned 500 total points
ID: 40530420
You can use Me keyword only in Form's module. If it is stand-alone module, you should use full name of your form like:
Forms!MyFormName!txtChronoID
0
 
LVL 33

Expert Comment

by:Mike Eghtebas
ID: 40530507
if it is in a form code window, also try

Me!txtChronoID
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

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

929 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

11 Experts available now in Live!

Get 1:1 Help Now