Can somebody tell why this piece of code doen't work. When i run it comes up with a parameter dialog box with the parameter name as Forms("Switchboard").txtEngineer when I want that to be the the parameter value. If I enter the value of Forms("Switchboard").txtEngineer as the parameter value it works fine.
stDocName = "Scores"
stLinkCriteria = "[Engineer] = " & Forms("Switchboard").txtEngineer
DoCmd.OpenForm stDocName, , , stLinkCriteria
stDocName = "Scores"
stLinkCriteria = "[Engineer] = " & Forms("Switchboard").txtEngineer
DoCmd.OpenForm stDocName, , , stLinkCriteria