PC Review


Reply
Thread Tools Rate Thread

another querytable.add question

 
 
Gary Keramidas
Guest
Posts: n/a
 
      30th May 2007

nobody was able to answer my last one, maybe i'll have better luck with this
one:

when importing data from a dbf file, how can i limit the records imported to the
value in one of the fields?
--


Gary



 
Reply With Quote
 
 
 
 
=?Utf-8?B?RlN0MQ==?=
Guest
Posts: n/a
 
      30th May 2007
hi,
if your are using microsoft query (MSQ), the can set up a parameter query
that prompts you for the criteria.
how?
click somewhere inside the returned data.
data>import external data>parameters.
check "prompt for value using the following string"
in the box below, enter your promp ie "enter somthing" or whatever>click ok.
refresh the MSQ. a little parameter box will pop up prompting for search
criteria.
you can also do this by editing the MSQ direct but this is a tad more
complicated.
if your are not using MSQ, what method are you using?

regards
FSt1


"Gary Keramidas" wrote:

>
> nobody was able to answer my last one, maybe i'll have better luck with this
> one:
>
> when importing data from a dbf file, how can i limit the records imported to the
> value in one of the fields?
> --
>
>
> Gary
>
>
>
>

 
Reply With Quote
 
Gary Keramidas
Guest
Posts: n/a
 
      30th May 2007
here's part of the code

With _
ws.QueryTables.Add(Connection:=Array("OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User
ID=Admin;Data " _
, _
"Source=" & fPath & ";;Jet OLEDB:Registry Path="""";Jet OLEDBatabase
Password=""""; Jet OLEDB:Engine " _
, _
"Type=18;Jet OLEDBatabase Locking Mode=0;Jet OLEDB:SFP=False"),
Destination:=ws.Range("A1"))

.CommandType = xlCmdTable
.CommandText = Array("invoice")
.Name = "invoice"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.Refresh BackgroundQuery:=False
End With

--


Gary


"FSt1" <(E-Mail Removed)> wrote in message
news:62D733FB-AE5C-4889-97F9-(E-Mail Removed)...
> hi,
> if your are using microsoft query (MSQ), the can set up a parameter query
> that prompts you for the criteria.
> how?
> click somewhere inside the returned data.
> data>import external data>parameters.
> check "prompt for value using the following string"
> in the box below, enter your promp ie "enter somthing" or whatever>click ok.
> refresh the MSQ. a little parameter box will pop up prompting for search
> criteria.
> you can also do this by editing the MSQ direct but this is a tad more
> complicated.
> if your are not using MSQ, what method are you using?
>
> regards
> FSt1
>
>
> "Gary Keramidas" wrote:
>
>>
>> nobody was able to answer my last one, maybe i'll have better luck with this
>> one:
>>
>> when importing data from a dbf file, how can i limit the records imported to
>> the
>> value in one of the fields?
>> --
>>
>>
>> Gary
>>
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
New QueryTable? =?Utf-8?B?TmVpbHk=?= Microsoft Excel Programming 1 8th Jun 2007 01:28 PM
web, querytable &jpg =?Utf-8?B?VG9tUg==?= Microsoft Excel Programming 0 4th Nov 2005 04:30 PM
Question about querytable vs copyfromrecordset zippy1981@gmail.com Microsoft Excel Programming 1 11th Sep 2005 04:33 AM
Re: QueryTable's Dick Kusleika Microsoft Excel Programming 0 14th Aug 2004 02:50 AM
QueryTable jp Microsoft Excel Discussion 0 25th Jul 2003 08:01 PM


Features
 

Advertising
 

Newsgroups
 


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