Show dcount result in command button caption

bd528

Registered User.
Local time
Today, 13:22
Joined
May 7, 2012
Messages
111
Hi all,

I'm trying to show text and a dcount result in a command box's caption. I've tried the following without success :-

Code:
Number of quotes by status & =DCount("[Quote_Status]","qryAcceptedQuotes")

Code:
Number of quotes by status & DCount("[Quote_Status]","qryAcceptedQuotes")

Is what I want to achieve possible?

Many thanks
 
button.caption = "Number of quotes by status " & DCount("*","qryAcceptedQuotes")
 
button.caption = "Number of quotes by status " & DCount("*","qryAcceptedQuotes")

Thanks - can this be done in desgin view? I tried using

"Number of quotes by status " & DCount("*","qryAcceptedQuotes")

but that literally showed in the caption
 
no, you need it in the form as code,
form event: ON CURRENT
 

Users who are viewing this thread

Back
Top Bottom