Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing changing data statistics from router 1

Status
Not open for further replies.

libby

ISP
Apr 22, 1999
8
US
I receive statistical data from a router regarding cable modem activity. The fields are always the same, but the data is constantly changing, different number of modems, different serial numbers, etc. I have imported this data many times, but always make a new table. I would just like to import it into the previous table and replace all data. <br>
<br>
I would like to do this, so I do not need to rebuild the queries, forms and reports I continually generate. Whenever I try to import into an existing table I get primary key errors. <br>
<br>
Thank you.<br>
libby@bendcable.com<br>
(Leslie Pritchett)
 
Are you running a delete query before you import the new data? Are there any Autonumber fields in the table, that may be getting stomped on with the new data?
 
Assuming the data is in the same format...<br>
<br>
When you import the data, click the Advanced button from the import wizard. From here, click Specs and save the import specifications. Next time you import, click advanced and open the previously saved specs. Work with this until you are able to import to an existing table using saved specs.<br>
<br>
Create a macro that:<br>
1) purges all rows from your table (via delete query)<br>
2) executes the "Transfer Text" action using the saved specs. Set properties (table name etc.) as necessary.<br>
<br>
Once you get the macro working, you can execute it from a command button on a form.<br>
<br>
Happy coding.<br>

 
Dear bitgrain,<br>
<br>
I will create a macro as you have suggested and let you<br>
know how it works out. <br>
<br>
Thank you for your suggestion.<br>
<br>
libby@bendcable.com<br>
Leslie Pritchett
 
Dear bitgrain,<br>
<br>
I will create a macro as you have suggested and let you<br>
know how it works out. <br>
<br>
Thank you for your suggestion.<br>
<br>
libby@bendcable.com<br>
Leslie Pritchett
 
Libby,<br>
<br>
I was wondering have you figured out how to delete the records from the table with a macros. I'm trying to do something similar. Instead I am linking data to the program and appending the information to the table with and append query.
 
Shirley, you can set up a Delete query and execute that from the macro.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top