Is This Possible - Field count within form?

JPW

Registered User.
Local time
Today, 10:49
Joined
Nov 4, 2007
Messages
51
I have attempted to create a chart in Access and it does work to a degree, but I get the strange sample chart in design view and can see charting the data in my database to be troublesome.

I've had a "brainwave".

I'd like the user to have a command button to bring up a form screen or a report screen and for it to have some data in it.

I have a field 'Reason' and it's text box is actually a combo box containing around 9 different values.

I'd like my form/report to list these values then next to it tells the user how many are displayed.

Below is just three things that is in the 'Reason' combo box. I have around 9 different ones in total.Notice on the right I have example numbers. Is there a way to do calculate this?

Thanks.


CFT: 45
RTA: 56
Obstruction:509
 
I think you'll have to lookup the value that you want, or sum the values that you want, but there is not enough information here to decipher what you really need...

I am thinking either a DLOOKUP and a DSUM or something, but I can't say for sure...

How are the list items on the left related to the corresponding numbers on the right? what do they mean?
 
JPW,

I'm also a little confused about your post, but in gereral:

If you think backwards, you need a form to display either:

Code:
1) Some number of "reasons" and their counts

   Select Reason, Count(*)
   From   YourTable
   Group By Reason
   WHere  Reason In ('Reason1', 'Reason2', 'Reason3', 'Reason4' ...)


2) Some number of "Reasons" (with associated detail).

   Select Reason, OtherInformation
   From   YourTable
   WHere  Reason In ('Reason1', 'Reason2', 'Reason3', 'Reason4' ...)

After you decide what you want to display, the only question is "Where do
I get the 'Reason1', 'Reason2', 'Reason3' ...?

You can make a multi-select listbox, it's RecordSource is a query:

Code:
   Select Distinct Reason
   From YourTable
   Order By Reason

Then, all you'll need is the logic to build the string --> In ('Reason1', 'Reason2', 'Reason3', 'Reason4' ...)

There are plenty of examples of that here.

Need more info,
Wayne
 

Users who are viewing this thread

Back
Top Bottom