count

  • Thread starter Thread starter boogie
  • Start date Start date
B

boogie

I am just starting on Access. In Excel, you can count the chracter content
of A1:D1 by using =countA(a1:d1). Is there a way to count the content of a
particular record in Access? I want to count horizontally instead of by
field. Example.
Field1 Field2 Field3 Total
Mon Tues 2
Sat Mon Sun 3
Wed Tue 2
I want to get the total on the horizontal side. I also would like to ignore
the empty cell.
Thanks
 
I am just starting on Access. In Excel, you can count the chracter content
of A1:D1 by using =countA(a1:d1). Is there a way to count the content of a
particular record in Access? I want to count horizontally instead of by
field. Example.
Field1 Field2 Field3 Total
Mon Tues 2
Sat Mon Sun 3
Wed Tue 2
I want to get the total on the horizontal side. I also would like to ignore
the empty cell.
Thanks

Hi,

You're using Access as though it is a spreadsheet, which doesn't work
very well. A better database design would contain your days in
different *records* in a related table, not in different *fields* in the
same record.

--
Armen Stein
Access 2003 VBA Programmer's Reference
http://www.amazon.com/exec/obidos/ASIN/0764559036/jstreettech-20
J Street Technology, Inc.
Armen _@_ JStreetTech _._ com
 
You're still thinking "in Excel". In Access it would be unusual to give
equal weight to the presence or absence of data in different fields within a
record. The direct answer to your question is "Yes" and "No". No, there is
no standard function that will do what you want. Yes, you can open a
recordset on your table and step through the records counting the fields
with data and then STORING or presenting the counts. If the preceding
sentence sounded like gobbledygook, believe me when I say that as you begin
to understand what a relational database system is all about, it won't seem
so strange.

Access table and query presentations kind of look like Excel spreadsheets.
Don't confuse yourself! Access is not a flawed version of Excel.

I recommend heading to your nearest Barnes & Noble or Borders bookstore and
picking up a copy of Access [your version] Step by Step. Go through it
cover to cover. Don't once confuse anything in that book with things you
know about Excel. The two products are made by the same people and share
lots and lots of user elements and low level components, even VBA and the
Integrated Development Environment. But they are different beasties
altogether.

Just as with Excel, there are several specialized Access newsgroups. You
might find microsoft.public.access.gettingstarted and ....tablesdesign good
groups to lurk while you're getting up to speed. You have a steep learning
slope ahead of you but, after a bit of learning, you'll have some blinding
insights as to what you can do with Access.

HTH
 
Back
Top