Re: VBA to import Visual FoxPro DBF in DBC into Access
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Mon, 6 Nov 2006 11:00:27 -0500
lucycard wrote:
On Friday, 11/3/06 I put this post on msdn newsgroup
access.modulesdaovba.adb and realized this morning that this may be
the more appropriate group:
No, you were right the first time. This question has nothing to do with
ADO, despite the fact that you use some ADO objects in your code. The
lines that are throwing your error have nothing to do with ADO ... or
shouldn't ... I haven't played with Access for awhile, but I cannot
remember being able to supply a recordset object, ADODB or DAO, or an
ADO connection object as an argument for the TransferDatabase method.
Access97 was pre-ADO, so it should be clear that the builtin methods
will not be able to recognize ADO objects. You can only supply a
connection string and the name of a table or saved query/view IIRC. The
Access97 online Help was very helpful supplying examples of various
connection strings. Take another look at it.
mycon.Open
myrst.Open strTabName, mycon, adOpenDynamic, adLockReadOnly
' In both cases I get the error message:
'Try number one
' DoCmd.TransferDatabase acImport, myrst, strfolder, acTable,
strTabName, strTabName, False
'Try number two
DoCmd.TransferDatabase acImport, , strFolder, acTable,
strTabName, strTabName, False
This is the only code in the app referring to ADODB.
How do I correct this to automate the file import process?
Your help is appreciated!
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
.
- Prev by Date: Re: Add New Item - Binding Navigator
- Next by Date: Re: VBA to import Visual FoxPro DBF in DBC into Access
- Previous by thread: Add New Item - Binding Navigator
- Next by thread: Re: VBA to import Visual FoxPro DBF in DBC into Access
- Index(es):
Relevant Pages
|