Apparently my stupidity knows no bounds!
In the switchboard the code now looks like this;
stLinkCriteria = "[VisitNumber]=" & "'" & Me![shelf] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria, , , Me![shelf]
which compiles so i assume that it is passing the...