See attached. Note there is no actual data in the tables.
Click on frmExportPrepare.
Click "Export to Excel" on the frmExportPrepare.
This crashes with "Too Few Parameters" error on the following line.
Set rs = db.OpenRecordset("select distinct RepArea from qryExportPrepare01")
However, when I run the actual SQL it runs fine - with no error.