|
-
Jun 4th, 2004, 06:24 PM
#1
Thread Starter
Lively Member
Newbie simple select statement
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|