Query worksheets in same workbook

B

briansaito

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?
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top