PureBluff
Board Regular
- Joined
- Apr 4, 2014
- Messages
- 174
- Office Version
- 2016
- Platform
- Windows
- Mobile
Good eveining,
I'm trying to build macro to query an Access DB, which works. I'm now trying to remove any fixed filepaths and turn them variable, however the macro recorder I initiated when building to core of the query has placed a comma in the UNC that I can't get rid of?
If I remove the ", " from the query I get type mismatch
but I can't fathom why a) it's there, b) why it needs it.
Any ideas?
Thanks
Steven
I'm trying to build macro to query an Access DB, which works. I'm now trying to remove any fixed filepaths and turn them variable, however the macro recorder I initiated when building to core of the query has placed a comma in the UNC that I can't get rid of?
Code:
"SELECT KPI.TYPE_of_Rejection, KPI.Primal_Box_Number, KPI.CASE_COUNT, KPI.Weight, KPI.ISSUE, KillSites.Supplier FROM " & DFull & ".KillSites KillSites, C:\Users\steve\Downl", "oads\Rejects.accdb.KPI KPI" & Chr(13) & "" & Chr(10) & "WHERE KPI.KILL_SITE_CODE = KillSites.KillSiteCode AND ((KPI.TYPE_of_Rejection='intake'))")
Code:
C:\Users\steve\Downl", "oads\Rejects.accdb.KPI
If I remove the ", " from the query I get type mismatch
but I can't fathom why a) it's there, b) why it needs it.
Any ideas?
Thanks
Steven