Set Variable to Query Field

D

Dorci

In Access code, how do I set a variable equal to a query field. I'm trying
to do this:

Dim strProjectNumber As String
strProjectNumber = (Select ProjectNumber from tblProjNums where ID = C;)

I'm getting an "expected expression" error. I get the impression I somehow
need to tell it that I'm trying to run a SQL Select statement.

Thanks for you help.
-Dorci
 
Top