By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,930 Members | 1,383 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,930 IT Pros & Developers. It's quick & easy.

ODBC Linking

P: 2
Hello all. I have an access database that i use to run daily dialer campaign reports. The issue I am having is that the table that i connect to using access thru an odbc connection is renamed everyday. Example: current information is in table Call_History. At some point that is copied and names Call_History100907(this table holds the previous days stats). I dont want to have to link a new table everyday and i have been tryin to figure out how to automatically link the new table to my database every day. I have tried to make macros to do this i also tried my limited vb knowledge to have this happen. Can someone out there give me a hand....??

Thank you.
Oct 9 '07 #1
Share this Question
Share on Google+
2 Replies


nico5038
Expert 2.5K+
P: 3,072
Hmm, I guess there will be multiple tables with a different number per day.
Is there an algoritm to see the last day ? (E.g. highest number)?

If so, you should open the database tables collection (is it also Access?) and scan for the tablename with the highest number. Otherwise you should keep track of all processed tables and accept the not recorded one(s?)

Getting the idea ?

Nic;o)
Oct 10 '07 #2

P: 2
Hmm, I guess there will be multiple tables with a different number per day.
Is there an algoritm to see the last day ? (E.g. highest number)?

If so, you should open the database tables collection (is it also Access?) and scan for the tablename with the highest number. Otherwise you should keep track of all processed tables and accept the not recorded one(s?)

Getting the idea ?

Nic;o)

Thank you for the idea. I actually was able to write a code for this:

Public Function autoRun() As Boolean

DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;DSN=pai2hst;LANGUAGE=us_english;" _
& "DATABASE=/usr/task/pai2h1/task_hst;", acTable, "call_history" & Format(Date, "mmddyy"), "Call_History"


End Function

Works wonderfuly
Oct 12 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.