At the least, I would suggest you never retain the subform control name created by Access, whether by wizard or not. This should be a rule regardless of what wizard you use, or what process you use whereby Access creates names. Your subform control and your subform have the same name. When I can't get data from the query is during code execution (I put a break on the transferspreadsheet line and then run the query) and AFAIK, the transfer function won't tell you if the query returns no data. If I remove the subform control reference from the query and use 7767 instead, it works in break mode. If the form is open and you run the query (don't push the button) the query works with the form reference.
I would explain that oddity thusly: there is a difference between the vba side and the Access side when it comes to how queries and other things are handled. Without getting technical, I'll say that a query might run fine from one side but not the other due to how the query is interpreted. It's my guess that your form reference is ambiguous to the transfer function and that can be version dependent because of updates to dll libraries and such. Try replacing the query subform reference with a valid ID (such as 7767) and check on the problem pc. Regardless of whether or not that fixes it, you really should do the following things:
-change the subform control (or the subform, or both) name; see
http://access.mvps.org/access/general/gen0012.htm or
https://access-programmers.co.uk/for...d.php?t=225837
- then modify the query reference to suit. The syntax for subform control reference is like
[Forms]![frmYourFormName]![subformCONTROLname].[Form]![txtYourControlName]**
where subformCONTROLname is the name of the control holding the subform NOT the subform
**this is how I discovered the potential ambiguity; the form control reference in the query didn't look correct
- you use 1 for transferspreadsheet parameter for headers. The correct values are -1 (true) or 0 (false), not 1
- compile your code and you will find that there are a lot of errors. If you don't fix them, prepare for unwanted results.
That should keep you busy for a bit.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.