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

May 2, 2015 | By | Reply More

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]

Tags: , , ,

Category: Microsoft Access, VBA

Leave a Reply