![]() |
Query worksheets in same workbook
Hello...
I am able to create a simple query within one workbook. The SQL code is: SELECT `Sheet2$`.Facility, `Sheet2$`.F2, `Sheet2$`.`Hipper CT`, `Sheet2$`.Chosen FROM `Q:\Dept\Guest Services\FOC Scheduling\FOC Scheduling`.`Sheet2$` `Sheet2$` WHERE (`Sheet2$`.F2<=20) AND (`Sheet2$`.Chosen=0) ORDER BY `Sheet2$`.F2 The problem I am having is if I move this file from the shared dive (Q) to a local drive, the query won't run. Not everybody has access to the shared drive, so they will need to keep this workbook locally. Without rewriting the code for each person, how can I achieve this? Does MS Query need the mapping in the coding? |
Query worksheets in same workbook
hi
you SQL statement is mapping the search to the shared drive in the FROM part of the statement. FROM `Q:\Dept\Guest Services\FOC Scheduling\FOC Scheduling`.`Sheet2$` `Sheet2$` you will have to rewrite this for each local drive. sorry. but conputer can be very picky at times. Regards FSt1 " wrote: Hello... I am able to create a simple query within one workbook. The SQL code is: SELECT `Sheet2$`.Facility, `Sheet2$`.F2, `Sheet2$`.`Hipper CT`, `Sheet2$`.Chosen FROM `Q:\Dept\Guest Services\FOC Scheduling\FOC Scheduling`.`Sheet2$` `Sheet2$` WHERE (`Sheet2$`.F2<=20) AND (`Sheet2$`.Chosen=0) ORDER BY `Sheet2$`.F2 The problem I am having is if I move this file from the shared dive (Q) to a local drive, the query won't run. Not everybody has access to the shared drive, so they will need to keep this workbook locally. Without rewriting the code for each person, how can I achieve this? Does MS Query need the mapping in the coding? |
All times are GMT +1. The time now is 06:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com