troubleshooting Question

Issue to DLookup in VBA

Avatar of Peter Chan
Peter ChanFlag for Hong Kong asked on
Microsoft AccessVBAMicrosoft ExcelMicrosoft Office
32 Comments1 Solution37 ViewsLast Modified:
Hi,
How to resolve issue with DLookup to line below? I want to validate if table "Week8-13" is existing within Access database. If that is not existing, then further copy details of T1 table into table "Week8-13".

Public Function TblExists(ByVal strTableName As String) As Boolean
TblExists = False
If Not IsNull(DLookup("Name", "MSysObjects", "Name = " & Chr(34) & strTableName & Chr(34) & " AND Type = 1")) Then TblExists = True
End Function



ASKER CERTIFIED SOLUTION
als315

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 32 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 32 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros