Patrick O'Dea
asked on
Ongoing recordset bits!
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.
Help please!
Database1.accdb
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.
Help please!
Database1.accdb
see attached
Database1-MX01.zip
Database1-MX01.zip
ASKER
Thanks mx,
I am getting there but..
I could not open the zipped file you returned.
I got the message that the version of Access could not be detected and that the database was read only.
Can you resend? (I am using A2010 but also have A2007)
I am getting there but..
I could not open the zipped file you returned.
I got the message that the version of Access could not be detected and that the database was read only.
Can you resend? (I am using A2010 but also have A2007)
sure ...stand by
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
MX,
Got it open now and the error is gone.
However, when I run the VBA on my live confidential data there is no data found.
Presumably, because the SQL is not finding any.
Is there any way I can see the actual SQL being run. I could then create a query to test.
If not I can create a small amount of dummy data. (SLightler trickier than it sounds!)
Got it open now and the error is gone.
However, when I run the VBA on my live confidential data there is no data found.
Presumably, because the SQL is not finding any.
Is there any way I can see the actual SQL being run. I could then create a query to test.
If not I can create a small amount of dummy data. (SLightler trickier than it sounds!)
sure ... see image. Set a Breakpoint at the places shown, click your export button. Code will break. Then in the Immediate window, you can show what the SQL is - I show two examples.
mx
Capture1.jpg
mx
Capture1.jpg
Probably best to close this Q out if the original question was resolved, which I guess it is ? Open a new Q if still having issue with SQL on real data ....
thx.mx
thx.mx
ASKER
THanks MX,
I may well be back with another question.
I will investigate a few options first.
Thanks again
I may well be back with another question.
I will investigate a few options first.
Thanks again
You are welcome.
mx
mx
SELECT Format([credit_date],"yyyy
FROM UserGroups INNER JOIN (Users INNER JOIN ((MerchantGroups INNER JOIN Merchants ON MerchantGroups.MERCHANT_GR
WHERE (((Format([credit_date],"y