• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 117
  • Last Modified:

Invalid use of Me keyword

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
SteveL13
Asked:
SteveL13
1 Solution
 
als315Commented:
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
 
Mike EghtebasDatabase and Application DeveloperCommented:
if it is in a form code window, also try

Me!txtChronoID
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

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