No Value given for one or more required parameters?

Seb

Registered User.
Local time
Tomorrow, 01:05
Joined
Jun 20, 2006
Messages
55
Hi All

I have a form (frmQuote) with a field called txtQuotenum. I'm using this form to export to word which works fine, except when I use this line

Set rs = Application.CurrentProject.Connection.Execute("SELECT tblItems.* FROM tblItems where tblitems.quotenum = " & txtQuoteNum)

the error I get is "No Value given for one or more required parameters".
If I dont include "where tblitems.quotenum = " & txtQuoteNum" in that string, it works ok, but obviously exports all records in tblitems.

I need only the records that match frmQuote.txtQuotenum. I've tried me.txtquotenum, forms.frmQuote.txtquotenum but same error

Any ideas?
 
Just a guess but: Is the field QuoteNum alpha-numeric as opposed to just being numeric? If so - you'll have to put quotes around the field value you pass in.

e.g. where tblitems.quotenum = '" & txtQuoteNum & "'"

Pete.
 
Hi Pete

Its defenitely numeric only....but I did try that anyway....and no luck!!
 
never mind

Thanks all, but I found a different way to d owhat I wanted

thanks
 

Users who are viewing this thread

Back
Top Bottom