![odbc excel driver too few parameters odbc excel driver too few parameters](https://weblogs.sqlteam.com/joew/img/subtext/WindowsLiveWriter/UsinganExcelasaReportingServicesdatasour_BB30/SSRS_Excel5-2008-08-21_2.jpg)
![odbc excel driver too few parameters odbc excel driver too few parameters](https://communities.bentley.com/resized-image/__size/559x374/__key/communityserver-wikis-components-files/00-00-00-00-43/6560.1.jpg)
#ODBC EXCEL DRIVER TOO FEW PARAMETERS CODE#
So what's the deal, you ask? Well, I'm trying to use that query as a recordset which code will loop through to populate the form with more data. If I use code (such as AfterUpdate) to open the query, it works. If I load up the form, type values in the boxes, and run the query, I get the same result. When I run the query on its own, it asks me to supply the criteria. The query pulls the fields from text boxes on the form, ad then outputs corresponding dates. Specifically, looking for dates based on a month and year provided by the user. I have a simple select query pulling data from one table based on info on the form. I have the same error (looking for two parameters) and I seem to have linked it to code actively running. I am having the same issue in a completely different database. INSERT INTO _ARCHIVE_ATT_COM ( MONTH_YEAR, PAYMENT_DATE,, DEALER, MARKET, SUBMARKET, STATE, REGION,, STORE,, ,, ,, ,, TRANS_TYPE, COMM_TYPE,, IMEI,, AMOUNT, NOTES,, TERM,, , Ident ) PARAMETERS PERIOD Text ( 255 ), PAYMENT_DATE DateTime * FROM ") ThenĢ00 Err.Raise -999,, "Unable to append imported data for the '" & strA & "' tab."Ģ90 If Not RunSQL("ALTER TABLE ADD COLUMN IDENT COUNTER(1,1) ") Thenģ00 Err.Raise -999,, "Unable to add column 'Ident' to the '" & cTMPTbl & "'."ģ20 If Not RunSQL("DELETE * FROM WHERE MONTH_YEAR='" & _ģ30 Err.Raise -999,, "Unable to remove old rows for " & sMonthYear & "'."ģ50 Set qry = (cQRY)ģ60 qry.Parameters("PERIOD") = sMonthYearģ70 qry.Parameters("PAYMENT_DATE") = CDate(sPayDate) User chose not to contiune."ġ60 DoCmd.CopyObject, cTMPTbl, acTable, cTMPTbl0ġ90 If Not RunSQL("INSERT INTO SELECT. Public Function ImportVData(sMonthYear As String, sPayDate As String, sFile As String, vArr) As Booleanġ10 DoCmd.TransferSpreadsheet acImport,, cTMPTbl0, sFile, True, strA & "$"ġ20 If CheckForImportErrors(strA & "$") Thenġ30 Err.Raise -999,, "Import errors encountered. the part in yellow is where is says that the error exist. I tried a cut down version of the db, but even with the bare objects required, it's too big.Hi, I have a DB set and in the form i have Queries that run from there it used to work fine and now when i tried to import more data it gives me this error. I've attached a copy of the query and the relationships. Therefore my problem is (yet again) a relationship one I feel. It feeds it into the query fine which is why I hadn't noticed it before. TblACPData is supposed to hold UnitNo and in the qryACPData which feeds frmACPData, it displays fine, but when I looked at the table it was blank. I now think I know what the problem may be: have attached a copy of the relationships. Then with Pat's I started putting it on the OnExit of the field that was giving me the error, then realized it would have to go on the OnClick of the open form - then realized that I don't actually want to run just the query, I need to open the form which the query sits behind, which at the moment runs fine - it's just the error happens on exit of one of the fields where I was running some other code - so now I haven't a clue where I'm supposed to run this SQL / other code from. I've had a go at both Mile-O and Pat's suggestions for starters.