Log in

View Full Version : Microsoft.HostIntegration.DataAccessLibrary.HCDFile in Access VBA



turkishgold
10-22-2009, 12:28 PM
Hi,
I'm trying to figure out how to use a method associated with the above Class in Access VBA (HCDFile.TableExists). It's part of a larger module, and the purpose is to evaluate whether or not a table exists in the CurrentProject.Connection, and if it doesn't, to run a SQL statement to create the table.
I can't figure out which library to references, or even if I need to do that...
http://msdn.microsoft.com/en-us/library/ee276102(BTS.10).aspx
Or, would there be a different way of approaching this with the same functionality (e.g., evaluating the tables in the Access database and if a similarly named table does not exist, it runs the SQL statement)?
any help would be greatly appreciated

thanks,
Tom

CreganTur
10-22-2009, 12:58 PM
Here's a link that shows a simple function to check and see if a table exists in the current database: http://mvps.org/access/tables/tbl0001.htm