View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default 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?