strSQL = "Select Closed From PoNumber" & "WHERE PriKey=" & Me.[PoNumber.PoID] & ";"
The best way to check on the SQL clause is to make a checkpoint on the next line after it is create and then use the debug window 'Debug.Print strSQL' which would have shown you:
Select Closed From PoNumberWHERE PriKey=PoID;
There are a couple problems as you see. First you need to add a space between PoNumber and WHERE. Second, if and only if the PoID is text you will need to delimit the text with quotes. If text, I would construct it like this:
strSQL = "Select Closed From PoNumber WHERE PriKey=" & """" & Me.[PoNumber.PoID] & """" & ";"
If numeric, I would construct it like this:
strSQL = "Select Closed From PoNumber WHERE PriKey=" & Me.[PoNumber.PoID] & ";"
Steve King
Growth follows a healthy professional curiosity