Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Another Syntax Problem

' .CommandText = Array( _
' "SELECT MILLINFO.PROJ_NAME, MILLINFO.PROJ_DIV, MILLINFO.PROJ_STLOC,
MILLINFO.PROJ_ADDRS, MILLINFO.PROJ_LOC, MILLINFO.PROJ_PROV,
MILLINFO.PROJ_POST" & Chr(13) & "" & Chr(10) & "FROM
`K:\DATA\DBDATA\JOBDATA`\MILLINFO.DBF MILLINFO" & Chr(13) & "" & Chr(10) &
"WHERE (MILLINFO.CUSTCODE='FCA')" _
' )


The above line is a part of a macro that I am writing. I need to substitue
the 'FCA' for a cell reference in my worksheet.

It keeps saying Type mismatch. Can't quite get the correct syntax.

Any help would be greatly appreciated.

Thanks in advance.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Another Syntax Problem

"WHERE (MILLINFO.CUSTCODE='" & Range("B9").Value & "')"

Note the single quotes included in the the strings on either side of the
cell reference.

--
Regards,
Tom Ogilvy


"Sharlene England" wrote in message
...
' .CommandText = Array( _
' "SELECT MILLINFO.PROJ_NAME, MILLINFO.PROJ_DIV,

MILLINFO.PROJ_STLOC,
MILLINFO.PROJ_ADDRS, MILLINFO.PROJ_LOC, MILLINFO.PROJ_PROV,
MILLINFO.PROJ_POST" & Chr(13) & "" & Chr(10) & "FROM
`K:\DATA\DBDATA\JOBDATA`\MILLINFO.DBF MILLINFO" & Chr(13) & "" & Chr(10) &
"WHERE (MILLINFO.CUSTCODE='FCA')" _
' )


The above line is a part of a macro that I am writing. I need to

substitue
the 'FCA' for a cell reference in my worksheet.

It keeps saying Type mismatch. Can't quite get the correct syntax.

Any help would be greatly appreciated.

Thanks in advance.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Another Syntax Problem

Thanks again Tom, that was exactly the help I needed.

Sincerely,

Sharlene England


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
Problem with Syntax? MurrayBarn Excel Worksheet Functions 8 June 12th 09 01:45 PM
PLS HLP! Countifs Syntax Problem? dee Excel Worksheet Functions 5 June 14th 07 10:14 AM
Delete syntax problem anny Excel Worksheet Functions 3 January 27th 06 03:59 AM
.XValues syntax problem JF_01 Charts and Charting in Excel 1 December 19th 05 08:21 PM
Syntax problem Alex H Excel Worksheet Functions 1 July 2nd 05 08:23 AM


All times are GMT +1. The time now is 12:54 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"