Solved

Invalid use of Me keyword

Posted on 2015-01-04
2
107 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
Comment Utility
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
Comment Utility
if it is in a form code window, also try

Me!txtChronoID
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

772 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