get a text field to count records of a table

M

McLean J

I have a form that imports a selected CSV file into a table in the database
I want to have a field on the form showing how many records are in the table AFTER the import..

Currently..
I am doing this with a list box that has a record source that counts the records of the table. But while this works to "display" the result, since it's a list box, I cannot use the value of that field without clicking on it.

So, can I set the value of a regular text box to count the records of a table?
 
M

Marshall Barton

McLean said:
I have a form that imports a selected CSV file into a table in the database.
I want to have a field on the form showing how many records are in the table AFTER the import...

Currently...
I am doing this with a list box that has a record source that counts the records of the table. But while this works to "display" the result, since it's a list box, I cannot use the value of that field without clicking on it.

So, can I set the value of a regular text box to count the records of a table?


How about using =DCount("*", "table")
 

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