Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Can't quite get this syntax to bring in the required information.

I want to have the user type into cell A1 then the query will get the
correct information.

The following works:
"SELECT JOB_NO.CUSTCODE, JOB_NO.JOB_NO" & Chr(13) & "" & Chr(10) & "FROM
`K:\DATA\DBDATA\JOBDATA`\JOB_NO.DBF JOB_NO" & Chr(13) & "" & Chr(10) &
"WHERE (JOB_NO.JOB_NO=50068)")


but now I want to replace the 50068 above with a cell reference to the value
in cell A1.

I've tried and tried and can't get this to work.

Any help would be greatly appreciated.

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 473
Default Can't quite get this syntax to bring in the required information.

Sharlene England wrote:
The following works:
"SELECT JOB_NO.CUSTCODE, JOB_NO.JOB_NO" & Chr(13) & "" & Chr(10) & "FROM
`K:\DATA\DBDATA\JOBDATA`\JOB_NO.DBF JOB_NO" & Chr(13) & "" & Chr(10) &
"WHERE (JOB_NO.JOB_NO=50068)")

but now I want to replace the 50068 above with a cell reference to the value
in cell A1.


"SELECT JOB_NO.CUSTCODE, JOB_NO.JOB_NO" & Chr(13) & "" & Chr(10) & _
"FROM `K:\DATA\DBDATA\JOBDATA`\JOB_NO.DBF JOB_NO" & _
Chr(13) & "" & Chr(10) & "WHERE (JOB_NO.JOB_NO=" & Range("A1") & ")"

In more recent versions of Excel you can give your query a "parameter" which
you can specify as coming from a range - and even have the query re-run
automatically when the value in the range changes. Select a cell in your
query results and try Data / Get External Data / Parameters

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I click on a cell and bring up an information box? Terry Excel Worksheet Functions 4 December 7th 07 07:08 PM
bring information from one sheet to another hotlh Excel Worksheet Functions 3 November 19th 07 09:31 AM
Bring information from one worksheet to another Jody Excel Discussion (Misc queries) 2 January 29th 07 05:53 PM
Required Information Mike J Excel Discussion (Misc queries) 1 May 22nd 06 05:57 AM
how do i bring information from one worksheet to another in excel. Excel Excel Worksheet Functions 1 February 21st 05 06:55 PM


All times are GMT +1. The time now is 03:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"