Hi People

Having a small problem with a select statement which I cant get my head around.Could someone show me the correct syntax Please?

I need to show records only for a particular Vacancy ID id so this is what i am attempting. this works if i remove the where statement,

Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=MSDASQL;dsn=XPHOME;uid=Paul ;pwd=;database=ContractManagement;"

set Contacts as new Recordset
contacts.open " select lngVacancyID, lngContractorID,chrContractorName,chrContractorState,chrComments,chrInterviewDetails, blnSubmitted, blnSuccessful from tblsubmittedcontractors WHERE lngVacancyID = " & me.txtfields(0).text, db, adOpenStatic, adLockOptimistic


dgContacts.datasource = Contacts
dgContacts.refresh