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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Many linked tables -> master

Status
Not open for further replies.

vise

Technical User
Jul 31, 2003
143
US
Hi all,

I posted in the VBA section but received no responses.
I have a database with several linked spreadsheets (identical fields) that need to be merged into one master sheet in access. I created the master sheet, and linked everything, created the append queries and a function that gets executed everytime i open the database so as to update the data. Now I am getting numeric field overflows everytime, and i know it can't be my fields because I ran it without a problem the first time.
Thanks for all your help on this problem.

This is my test code with a delete all from master, then followed by two append queries. Note: it all ran perfectly fine the first time around.

VBA Code
Public Function RefreshData()
DoCmd.SetWarnings False
DoCmd.OpenQuery "Delete All Consolidated"
DoCmd.OpenQuery "CTAppendQuery"
DoCmd.OpenQuery "DCAppendQuery"
MsgBox "Done!"
DoCmd.SetWarnings True
End Function



-Vise
 
Just in case anyone needs help in this matter.
It seems like my access for some reason had a real hard time with queries. Just running the sql commands from the function seemed to solve the problem. Thus, I just went to each query -> right click -> viewed in sql -> copied the code -> open VBA function -> paste as
DoCmd.RunSql "Select.....what you just copied from the query". That should do the trick :) Thanks to those who pondered.

-Vise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top