Hi there,
Don't know whether this is the correct sub-forum for this (Please move if it isn't)
Does anyone know of a way to force (either on the VBA or SQL side) a query to return zero for results not in a query.
So say you have information for A, B, C, E in the Database, but you want to return data for A, B , C, D, E, F, is there any way to get excel to return D = 0, F = 0 in what is copied to the excel spreadsheet?
In context, from the code below, I want to return info for all of the currencies listed in the below query (but zeros if nothing exists in the database table.)
I'm not sure whether using a .find method would work necessarily, as I have to copy about 6 similar recordsets next to each other (all for currencies), and there may be info posted for a currency on one recordset, but not on another.
Thanks in advance
Here's my code:
As you might be able to see from the code, my end goal is to copy across all combinations of the contents of the three arrays next to each other in a sheet. (Which I will then use for an index & match query). I'm fairly sure of how I can do this, its just making sure that the same number of rows are returned for each query (so that which line refers to which currency stays constant)
Bookmarks