Import from FE to BE

  • Thread starter Thread starter dennis g
  • Start date Start date
D

dennis g

Guest
Have an application that was orignally built for local use, but now want to split it and place the data on the server and the front-end on several desktops. Tests have gone well. However, I update the main table every day with data I get off a mainframe. I have always used this code:

Dim strTable As String
Dim strTxt As String

strTable = InputBox("Please Enter the Database Name", "Database Name", "namec_check")
strTxt = InputBox("Please enter the text file name", "Text File", "d:\names\names.txt")

to help me when I run the update. How do I specify the table when it moves to the network drive [N:\ResPro.opr\ROCNorth\names_be.mdb].
Any and all help appreciated....
'DoCmd.TransferText acImportDelim, , strTable, strTxt
DoCmd.TransferText , , strTable, strTxt
 
woops! something went wrong. code got mixed up with the message....

Have an application that was orignally built for local use, but now want to split it and place the data on the server and the front-end on several desktops. Tests have gone well. However, I update the main table every day with data I get off a mainframe. I have always used this code:

Dim strTable As String
Dim strTxt As String

strTable = InputBox("Please Enter the Database Name", "Database Name", "namec_check")
strTxt = InputBox("Please enter the text file name", "Text File", "d:\names\names.txt")

'DoCmd.TransferText acImportDelim, , strTable, strTxt
DoCmd.TransferText , , strTable, strTxt

to help me when I run the update. How do I specify the table when it moves to the network drive: [N:\ResPro.opr\ROCNorth\names_be.mdb].

Any and all help appreciated....
 
I am not sure I understand the question but if you are using a path like C:\ResPro.opr\ROCNorth\names_be.mdb, C being your local drive, yes you can just replace the C with what ever the network drive is mapped at.

Post back if I misunderstood your post.
 
That was what I thought, but I keep getting an error on the path, but the path is correct. Access acts like it only wants the table name. The error message (I'm not at the office) states Access cannot find the table 'XXX'. Can you specify the table? There are three different tables sitting up there in database Names.be_mdb.
 
I don't do much file opening like that directly, but could it be the . in the Respro.opr causing the error.

I don't have a clue and would like to read the answer to this one.
 
Okay, I'll try that, but only in testing. The folder names are setup by the LAN people, I don't have the whiskers to change that for real....
 
Okay, now I've found a different problem. Moved everything off the net drive. I have two Access databases. In one (d:\test\names.mdb), I am running code to import a text file (d:\names\names.txt) into a the other database (d:\names\test.mdb). The table name in test.mdb I want to put the data in is called safe. How do I do that using the TransferText action? The directions call for the table name, but how do I tell access we are going out to d:\names\test.mdb and then using table 'safe'?
 
Hi dennis g,

In the TransferText Action, are you using an optional Specification Name as one of your arguments?

I believe if you define a Spec and use it in TransferText, you can get where you want.

Hope this helps.

Ken Grubb
Burlington, NC, USA
 
Well, Ken, you were right. The import spec wizard helped, by making me look at what I was doing. I only had to point at the ref to the table on the local drive where it shows the links, Access pointed the data to the correct location. DUH !!! Thanks for the help.

Dennis
 

Users who are viewing this thread

Back
Top Bottom