How to count record

N

Nova

My table has 4 column A,B,C and D.
I would like to select field A,B and D WHERE D = "xxx" and count record
result to show in textbox in my form. How to I can write code by don't use
Dcount function?
 
T

Tom van Stiphout

On Thu, 10 Dec 2009 19:34:21 -0800, Nova

Why is DCount not a good solution for you?

You can do this the hard way: create a totals query that counts the
records, then write some VBA code to execute that query and get the
results back.
Or you write a one-liner DCount.

-Tom.
Microsoft Access MVP
 
N

Nova

Thank you for your answer, I just find another method, It may be faster than
aggregate function because my link speed between backend and frontend is only
512 KB.

"Tom van Stiphout" เขียน:
 
T

Tom van Stiphout

On Thu, 10 Dec 2009 21:15:01 -0800, Nova

Cool. Please publish your results in this newsgroup, so all can learn.

If you're on a slow link to a Server back-end, for sure use a
Passthrough query.

-Tom.
Microsoft Access MVP
 

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