A button on my Quote form (frmQuotes) causes a maketable query to run. The created table is then read to provide data for creating a word document. This all currently works fine.
I am out to streamline the database and wish to replace the created table with a dbs.OpenRecordset(strSQL) function
The (maketable)query SQL is
SELECT tblQuotes.*, REPS.FullName, REPS.Title, REPS.Email, tblQuotes.QuoteNum FROM tblQuotes INNER JOIN REPS ON tblQuotes.RepID = REPS.ID WHERE (((tblQuotes.QuoteNum)=[Forms]![frmQuotes]![QuoteNum]));
and I have tried converting it to
strSQL = “SELECT tblQuotes.*, REPS.FullName, REPS.Title, REPS.Email, tblQuotes.QuoteNum ” & _ “FROM tblQuotes INNER JOIN REPS ON tblQuotes.RepID = REPS.ID ” & _ “WHERE (((tblQuotes.QuoteNum)=[Forms]![frmQuotes]![QuoteNum]));”
but I get
Error 3061 Too few parameters 1 expected
Once again, where have I gone wrong? I never seem to be able to get these right!
Thanks in advance,