I know how to add columns individually(=count(name of column), but I am trying to find a formula to add the sum of all the columns in my form. I tried =count(*), but it's only adding the total for the first two columns. I collectively would like to add the total for all 10 of my columns under one total. Hopefully this makes sense. Thank you.
Kevin Yip
@Reply 2 years ago
The Count() function counts rows; it cannot count columns. To count columns, you need to invoke the TableDefs or QueryDefs objects in VBA. The number of columns is stored in the Fields property. For instance, the number of columns in Table1 is:
Cyrus, you're thinking like an Excel sheet. Access has FIELDS, not columns. Are you trying to count the fields that have values? I need more info in order to be able to help you.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visitor Forum.