how to assign the result of query to a label's caption? Thanks

Joined
Jul 5, 2005
Messages
22
Reaction score
0
Hi,

I have an existing query, named "query1", "select count(*) from students where amount IS NULL",

i will get "60" and want to sign it to a label's caption in a form. such as,

lblTitle.caption = "There are " & resultOfQuery (60) & " students."

how to do this?

i code as but not work.

lblTitle.Caption = "There are " & CurrentDb.QueryDefs("query0").ReturnsRecords & " students."

then lblTitle shows "There are TRUE students"

Thanks really.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top