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?
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?