View Full Version : Where clause


Rich
09-22-2010, 03:19 AM
Any ideas why this statement and others like it don't work in 2010

This works

DoCmd.OpenReport "rptPerLett", acNormal, "", "[tblPerLettr]![cntLettrID]=[Forms]![frmPerLttrs]![Jobs].[Form]![cntLettrID]"

This just prints Type!
DoCmd.OpenReport "perConEnv", acNormal, "", "[tblPerLettr]![cntLettrID]=[Forms]![frmPerLttrs]![Jobs].[Form]![cntLettrID]"

namliam
09-22-2010, 03:24 AM
Dont think it works in 2002 either...

Try something like:
DoCmd.OpenReport "rptPerLett", acNormal, "", "[tblPerLettr]![cntLettrID]= " & [Forms]![frmPerLttrs]![Jobs].[Form]![cntLettrID]

Rich
09-22-2010, 04:56 AM
Thanks but for some strange reason it's now working even though I haven't changed anything:confused: