VBA Access function to check if a field/column exist in a table

I was trying to build a small system/procedure using MS Access which will import excel file to my MS Access database. The field or column inside the Excel file is vary from file to file. So here I need to check if a field/column exist and then import theĀ file into Access.

In order to check if a file exist, we can use a simple function which I call CheckExist function. Here is the code

[codesyntax lang=”vbnet”]

[/codesyntax]

Then, we can use this function on other section to check if a field exist on a table

[codesyntax lang=”vbnet”]

[/codesyntax]

Ariel

Leave a Reply

Your email address will not be published. Required fields are marked *