Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default another querytable.add question


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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default another querytable.add question

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.
dataimport external dataparameters.
check "prompt for value using the following string"
in the box below, enter your promp ie "enter somthing" or whateverclick 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default another querytable.add question

here's part of the code

With _
ws.QueryTables.Add(Connection:=Array("OLEDB;Provid er=Microsoft.Jet.OLEDB.4.0;Password="""";User
ID=Admin;Data " _
, _
"Source=" & fPath & ";;Jet OLEDB:Registry Path="""";Jet OLEDB:Database
Password=""""; Jet OLEDB:Engine " _
, _
"Type=18;Jet OLEDB:Database 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" wrote in message
...
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.
dataimport external dataparameters.
check "prompt for value using the following string"
in the box below, enter your promp ie "enter somthing" or whateverclick 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
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
web, querytable &jpg TomR Excel Programming 0 November 4th 05 04:30 PM
Question about querytable vs copyfromrecordset [email protected] Excel Programming 1 September 11th 05 04:33 AM
Paste into a QueryTable Glenn1203 Excel Programming 2 March 24th 05 08:23 PM
Querytable range name Ray[_12_] Excel Programming 0 September 13th 04 08:29 PM
Querytable Ben.c Excel Programming 4 December 3rd 03 09:11 AM


All times are GMT +1. The time now is 12:18 PM.

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

About Us

"It's about Microsoft Excel"