Dear All
I’m trying to get my database to do a little automatic emailing of data, why just store it if you can spread it around??
Any way I’m getting an error message on the code I’m using: –
Error message = Run Time error ‘3062’ Too few parameters. Expected 2.
My Access help returns a grey screen……
Here’s the code, up to the line after the one the de###### highlights. I’ve checked and triple checked the spelling of the query I’m refering to.
Private Sub SaveRecBtn_Click()
‘On Error GoTo Err_saverecbtn_Click (removed to activate the de###### rather than just the error message)
DoCmd.SetWarnings False
Dim DbS As DAO.Database
Dim EmailAddys As DAO.Recordset
Dim VendorEmailAddys As DAO.Recordset
Dim strEmailAddys As String
Dim strVendorEmailAddys As String
Dim Response As String
‘Dim RejectNote As Report
Set DbS = CurrentDb
Set EmailAddys = DbS.OpenRecordset(“InternalEmailAddyQry”) This is the line the de###### highlights when the code stops.
Set VendorEmailAddys = DbS.OpenRecordset(“EmailContactDataQry”)
I’ve tried the instruction after the DbS.OpenRecordset with the brackets, withot the brackets, with the speech marks etc, even tried a few variations on the ‘template’ supplied by VBA, but to no avail.
It’s going to be something simple I’ve missed, always is, but I can’t find it from any of the available resources I have. Sorry
Thanks for the help
Ian