G Guest Jan 18, 2005 #1 Dear all, Could anyone tell me how to check the table exists or not in access. Thanks, Jason.
N Nikos Yannacopoulos Jan 18, 2005 #2 Jason, Use function: DLookup("[Name]","MSysObjects","[Name]= 'TableName' And [Type] = 1") Where TableName is the name of the table you are looking for. If it exists the function will return the table name, otherwise it wil return Null. HTH, Nikos
Jason, Use function: DLookup("[Name]","MSysObjects","[Name]= 'TableName' And [Type] = 1") Where TableName is the name of the table you are looking for. If it exists the function will return the table name, otherwise it wil return Null. HTH, Nikos
V Van T. Dinh Jan 18, 2005 #3 IIRC, [Type] = 1 will only pick up local Tables. If the Table is an Access-linked Table, [Type] = 6. If the Table is an ODBC-linked Table, I believe [Type] = 4. -- HTH Van T. Dinh MVP (Access) Nikos Yannacopoulos said: Jason, Use function: DLookup("[Name]","MSysObjects","[Name]= 'TableName' And [Type] = 1") Where TableName is the name of the table you are looking for. If it exists the function will return the table name, otherwise it wil return Null. HTH, Nikos Dear all, Could anyone tell me how to check the table exists or not in access. Thanks, Jason. Click to expand... Click to expand...
IIRC, [Type] = 1 will only pick up local Tables. If the Table is an Access-linked Table, [Type] = 6. If the Table is an ODBC-linked Table, I believe [Type] = 4. -- HTH Van T. Dinh MVP (Access) Nikos Yannacopoulos said: Jason, Use function: DLookup("[Name]","MSysObjects","[Name]= 'TableName' And [Type] = 1") Where TableName is the name of the table you are looking for. If it exists the function will return the table name, otherwise it wil return Null. HTH, Nikos Dear all, Could anyone tell me how to check the table exists or not in access. Thanks, Jason. Click to expand... Click to expand...