Thanks to you both for assisting.
I have been playing around and have got it passed to first part of code, but now i am getting type mismatch errors in my second part of the code. (this code still works on other queries where parametres are not needed)
debug shows the error on "Set objRST =...
Changed that, i had to delete "Dim rstCountOrders As Recordset" from the start as it mentioned duplicate data... I still get a mismatch error. This time according to debug on "Set qdfMyQuery = dbSample.QueryDefs("FullAreaExport")" .
thanks once again
So i have adapted the code i think to fit my database, but i get data mismatch errors. A debug shows on the "Set rstCountOrders = qdfMyQuery.OpenRecordset()" Im not sure what the rstcountorders is.....
my code at the moment is:
Private Sub Command293_Click()
strQueryName = "FullAreaExport"...
Thanks, yes i do now get an error on access, "too few parameters, expected 1" I have looked at that link to microsoft but as a bit of a novice its confused me.
How can i work that into my VB code? I want it to pick up the parameter from my combo box so i dont want to hardcode or ask the...
Hi,
thanks for the swift reply, at the moment i get no errrors at all.... my excel sheet loads up and names the sheet the same as my query but no data is entered into it. I think i need to put the criteria code into VB rather than it sat as code in the query itself..
Hi,
I have been searching on the net for the past few hours and no success so any help will be appriciated. So far i have a query "FullAreaExport" this uses a criteria for which is fetches from a combo box on my form. when i run the query from the form it works fine but what i want to do is...