Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002
    Posts
    8

    Exclamation Unanswered: DCount returning error

    I'm using DCount to control options on a form. Example, when form opens it looks at different 'Services' associated with the selected Client. There are 6 possible services and I supply the user with toggle buttons to view a subform with detail of each service inside the larger Client form.

    DCount finds if there is a record for each service for the client and enables the toggle buttons only for the services associated with the client.

    This is working perfect for about 95% of my clients. However, I have a few that when I open the client detail form I get the following error:

    "Run time error '2427': You entered an expression that has no value."

    The following line is the DCount command I'm using for each service:

    --------------------------------------------------------------------------------
    If DCount("*", "PM_Service", "[ClientID]=" & Me![ClientID] & " AND [ServiceCode]='COL' AND [EndDate] Is NULL") > 0 Then
    tglCOL.Enabled = True
    End If
    --------------------------------------------------------------------------------

    If I run a manual query for the clients returning this error the results appear to be no different then the results for the client which work.

    Any ideas on debugging this error?

  2. #2
    Join Date
    Dec 2002
    Posts
    8

    Talking

    Nevermind, I figured it out. Turns out it was a linking issue and not a code issue. I tried to delete the post but was not able to.

Posting Permissions

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