Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Location
    Harrow, UK
    Posts
    53

    Unanswered: Putting query result in button caption

    I have a form with a button on it (Command33).
    I have a query (Overdue) which list some records.

    I want the button's caption to display the total number of records returned by the query.

    So far I have the following, but I get a compile error (wrong number of arguments). I'll admit I'm stumped.


    Private Sub Form_Activate()
    Me.Command33.Caption = "Overdue tot = " & Count([Overdue])
    End Sub
    Thank you,
    James

  2. #2
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    try dcount("*","Overdue") instead of Count(overdue)

  3. #3
    Join Date
    Jul 2003
    Location
    Harrow, UK
    Posts
    53
    Originally posted by jmrSudbury
    try dcount("*","Overdue") instead of Count(overdue)

    That works beautifully - thank you.
    Now all I need to do is speed up the underlying query so it doesn't slow the form down.
    Thank you,
    James

Posting Permissions

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