Consulting

Results 1 to 3 of 3

Thread: DCount()

  1. #1
    VBAX Regular
    Joined
    Nov 2018
    Posts
    41
    Location

    DCount()

    If DCount("[REG_NO]", "Tbl_Regn", "[REG_NO] =" & Me.Parent.[ID]) > 0 Then
    Msgbox “Rec Exists”
    Endif


    The underlined statement is giving Runtime Error '2471'
    The expr you entered as a query parameter produced this error: 'F'


    Please guide me.

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    You could try
    If DCount("[REG_NO]", "Tbl_Regn", "[REG_NO] = '" & Me.Parent.[ID] & "'") > 0 Then

    Do you know what value Me.Parent.[ID] returns?
    Have you saved the record before invoking the DCount?

  3. #3
    VBAX Regular
    Joined
    Nov 2018
    Posts
    41
    Location
    Quote Originally Posted by OBP View Post
    You could try
    If DCount("[REG_NO]", "Tbl_Regn", "[REG_NO] = '" & Me.Parent.[ID] & "'") > 0 Then

    Do you know what value Me.Parent.[ID] returns?
    Have you saved the record before invoking the DCount?

    Thanks Thanks Thanks!!! GOD BLESS YOU!!!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •