Access2000: ODBC query from VBA - like one in Excel

From: Arvi Laanemets (garbage_at_hot.ee)
Date: 03/29/04


Date: Mon, 29 Mar 2004 11:14:42 +0300

Hi

Does someone here help me with VBA-code for Access2000, which imports data
from FoxPro tables into Access table (overwriting old data), using ODBC
driver for Visual FoxPro Tables. I have equivalent (and working in way I
need) query in Excel, with QueryTable properties like:

    .Connection="ODBC;DSN=Visual FoxPro
Tables;UID=;PWD=;SourceDB=T:\DataFolder;SourceType=DBF;Exclusive=No;Backgrou
ndFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
    .Name="Query from Visual FoxPro Tables"
    .Sql/.CommandText= "SELECT a.a1, a.a2, a.a3 FROM table1 a, table2 b
WHERE b.b1 = a.a4 AND ((MONTH(b.b2)=2) AND (YEAR(b.b2)=2004) AND
(a.a2<='060')

The code must access FoxPro tables being in use at same time. So long I have
a code, which imports only whole tables (all fields, without any
conditions), doesn't work whenever table is used or when there are memo
fields in table, and instead overwriting the destination table greates a new
one (when old table is p.e. MyTable, creates MyTable1, and then MyTable2,
etc.), and I'm not happy enough with it :-(((

Thanks in advance
Arvi Laanemets
(When sending e-mail, use address arvil@tarkon.ee)



Relevant Pages

  • Access2000: ODBC query from VBA - like one in Excel
    ... Does someone here help me with VBA-code for Access2000, which imports data ... from FoxPro tables into Access table (overwriting old data), ... driver for Visual FoxPro Tables. ...
    (microsoft.public.access.formscoding)
  • Access2000: ODBC query from VBA - like one in Excel
    ... Does someone here help me with VBA-code for Access2000, which imports data ... from FoxPro tables into Access table (overwriting old data), ... driver for Visual FoxPro Tables. ...
    (microsoft.public.data.odbc)
  • Access2000: ODBC query from VBA - like one in Excel
    ... Does someone here help me with VBA-code for Access2000, which imports data ... from FoxPro tables into Access table (overwriting old data), ... driver for Visual FoxPro Tables. ...
    (microsoft.public.access.queries)
  • Re: Visual Fox-Pro - not really OT
    ... Visual FoxPro is a Microsoft database program, ... Raceform Interactive is a subscription product. ...
    (uk.sport.horseracing)
  • Re: Linking to DBF FoxPro files
    ... Start with the latest ODBC driver for FoxPro and Visual FoxPro, ... Now open up the ODBC dialog. ... Data Sources. ... Scroll down to the Microsoft Visual FoxPro Driver. ...
    (microsoft.public.access.queries)