Issue to DLookup

Peter_1985 2,686 Reputation points
2021-05-06T02:45:48.217+00:00

Hi,
How to resolve issue with DLookup to line below?

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

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,737 questions
Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
881 questions
{count} votes

4 answers

Sort by: Most helpful
  1. DBG 2,301 Reputation points
    2021-05-06T03:23:24.313+00:00

    What's the issue with it?

    0 comments No comments

  2. Peter_1985 2,686 Reputation points
    2021-05-06T03:39:47.303+00:00

    I got issue below, to DLookup.
    94244-1e.png


  3. Peter_1985 2,686 Reputation points
    2021-05-06T03:46:56.477+00:00

    See it below
    94261-1f.png


  4. Peter_1985 2,686 Reputation points
    2021-05-06T04:26:13.21+00:00

    FYI
    94281-1g.png

    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".


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.