PC Review


Reply
Thread Tools Rate Thread

Display totals on a form of selected data/Change query fields from form

 
 
weircolin@googlemail.com
Guest
Posts: n/a
 
      11th Aug 2006
Hi

I am wanting to select information from two combo boxes and then show a
total of how many entries match this criteria.

At the moment to do this I will have to do a series of queries (9
topics each with around 5 sub topics, a lot of queries) to get this
information.

Is there anyway a query field can reference what is in the fields of a
form? Also, even if I were to do this all using seperate queries, how
do I get the form to display the totals?

Cheers

Colin

 
Reply With Quote
 
 
 
 
Jeff L
Guest
Posts: n/a
 
      11th Aug 2006
Is there anyway a query field can reference what is in the fields of a
form?

Yes. In the criteria of your query field, put
Forms!YourFormName!FormFieldName.

Also, even if I were to do this all using seperate queries, how do I
get the form to display the totals?

You can do this in the query itself or you can have a field on the form
perform the calculation. If you do it in the query, you will need to
use Totals. Click View, Totals. Then in the column you wish to add
up, put Sum in the Totals row for that field. You would then simply
add that field to your form. If you do the calculation on the form
itself, you would make a new textbox and put =Sum([YourFieldName]) in
the control source.

Hope that helps!





(E-Mail Removed) wrote:
> Hi
>
> I am wanting to select information from two combo boxes and then show a
> total of how many entries match this criteria.
>
> At the moment to do this I will have to do a series of queries (9
> topics each with around 5 sub topics, a lot of queries) to get this
> information.
>
> Is there anyway a query field can reference what is in the fields of a
> form? Also, even if I were to do this all using seperate queries, how
> do I get the form to display the totals?
>
> Cheers
>
> Colin


 
Reply With Quote
 
weircolin@googlemail.com
Guest
Posts: n/a
 
      11th Aug 2006
Hi

Thanks for the info.

I think I am going wrong somewhere. I am not trying to do the
calculation just yet. I set the criteria as you said and I can see how
it works. (Kicking myself for being so stupid as I've been using the
same thing to perform other things on forms) How would I get the query
to launch showing the selected criteria I have specified on the form?

Thanks

Colin
Jeff L wrote:
> Is there anyway a query field can reference what is in the fields of a
> form?
>
> Yes. In the criteria of your query field, put
> Forms!YourFormName!FormFieldName.
>
> Also, even if I were to do this all using seperate queries, how do I
> get the form to display the totals?
>
> You can do this in the query itself or you can have a field on the form
> perform the calculation. If you do it in the query, you will need to
> use Totals. Click View, Totals. Then in the column you wish to add
> up, put Sum in the Totals row for that field. You would then simply
> add that field to your form. If you do the calculation on the form
> itself, you would make a new textbox and put =Sum([YourFieldName]) in
> the control source.
>
> Hope that helps!
>
>
>
>
>
> (E-Mail Removed) wrote:
> > Hi
> >
> > I am wanting to select information from two combo boxes and then show a
> > total of how many entries match this criteria.
> >
> > At the moment to do this I will have to do a series of queries (9
> > topics each with around 5 sub topics, a lot of queries) to get this
> > information.
> >
> > Is there anyway a query field can reference what is in the fields of a
> > form? Also, even if I were to do this all using seperate queries, how
> > do I get the form to display the totals?
> >
> > Cheers
> >
> > Colin


 
Reply With Quote
 
Jeff L
Guest
Posts: n/a
 
      11th Aug 2006
By "launch", are you just trying to open the query to see the results?
That would be
Docmd.OpenQuery "YourQueryName" You will need to explain a little
better if I missed what you are talking about.

(E-Mail Removed) wrote:
> Hi
>
> Thanks for the info.
>
> I think I am going wrong somewhere. I am not trying to do the
> calculation just yet. I set the criteria as you said and I can see how
> it works. (Kicking myself for being so stupid as I've been using the
> same thing to perform other things on forms) How would I get the query
> to launch showing the selected criteria I have specified on the form?
>
> Thanks
>
> Colin
> Jeff L wrote:
> > Is there anyway a query field can reference what is in the fields of a
> > form?
> >
> > Yes. In the criteria of your query field, put
> > Forms!YourFormName!FormFieldName.
> >
> > Also, even if I were to do this all using seperate queries, how do I
> > get the form to display the totals?
> >
> > You can do this in the query itself or you can have a field on the form
> > perform the calculation. If you do it in the query, you will need to
> > use Totals. Click View, Totals. Then in the column you wish to add
> > up, put Sum in the Totals row for that field. You would then simply
> > add that field to your form. If you do the calculation on the form
> > itself, you would make a new textbox and put =Sum([YourFieldName]) in
> > the control source.
> >
> > Hope that helps!
> >
> >
> >
> >
> >
> > (E-Mail Removed) wrote:
> > > Hi
> > >
> > > I am wanting to select information from two combo boxes and then show a
> > > total of how many entries match this criteria.
> > >
> > > At the moment to do this I will have to do a series of queries (9
> > > topics each with around 5 sub topics, a lot of queries) to get this
> > > information.
> > >
> > > Is there anyway a query field can reference what is in the fields of a
> > > form? Also, even if I were to do this all using seperate queries, how
> > > do I get the form to display the totals?
> > >
> > > Cheers
> > >
> > > Colin


 
Reply With Quote
 
weircolin@googlemail.com
Guest
Posts: n/a
 
      14th Aug 2006
Hi

Yes, by launch I just want the query to run with the data that I have
selected from the combo boxes on the same form.

I've tried what you have said but it's not showing me any entries on
the query. Has the column heads but no data.

Thanks

Colin
Jeff L wrote:
> By "launch", are you just trying to open the query to see the results?
> That would be
> Docmd.OpenQuery "YourQueryName" You will need to explain a little
> better if I missed what you are talking about.
>
> (E-Mail Removed) wrote:
> > Hi
> >
> > Thanks for the info.
> >
> > I think I am going wrong somewhere. I am not trying to do the
> > calculation just yet. I set the criteria as you said and I can see how
> > it works. (Kicking myself for being so stupid as I've been using the
> > same thing to perform other things on forms) How would I get the query
> > to launch showing the selected criteria I have specified on the form?
> >
> > Thanks
> >
> > Colin
> > Jeff L wrote:
> > > Is there anyway a query field can reference what is in the fields of a
> > > form?
> > >
> > > Yes. In the criteria of your query field, put
> > > Forms!YourFormName!FormFieldName.
> > >
> > > Also, even if I were to do this all using seperate queries, how do I
> > > get the form to display the totals?
> > >
> > > You can do this in the query itself or you can have a field on the form
> > > perform the calculation. If you do it in the query, you will need to
> > > use Totals. Click View, Totals. Then in the column you wish to add
> > > up, put Sum in the Totals row for that field. You would then simply
> > > add that field to your form. If you do the calculation on the form
> > > itself, you would make a new textbox and put =Sum([YourFieldName]) in
> > > the control source.
> > >
> > > Hope that helps!
> > >
> > >
> > >
> > >
> > >
> > > (E-Mail Removed) wrote:
> > > > Hi
> > > >
> > > > I am wanting to select information from two combo boxes and then show a
> > > > total of how many entries match this criteria.
> > > >
> > > > At the moment to do this I will have to do a series of queries (9
> > > > topics each with around 5 sub topics, a lot of queries) to get this
> > > > information.
> > > >
> > > > Is there anyway a query field can reference what is in the fields of a
> > > > form? Also, even if I were to do this all using seperate queries, how
> > > > do I get the form to display the totals?
> > > >
> > > > Cheers
> > > >
> > > > Colin


 
Reply With Quote
 
weircolin@googlemail.com
Guest
Posts: n/a
 
      14th Aug 2006
Hi

I've managed to work out what my problem was. Had made a smal mistake.

Thanks for all your help, much appreciated.

Colin
(E-Mail Removed) wrote:
> Hi
>
> Yes, by launch I just want the query to run with the data that I have
> selected from the combo boxes on the same form.
>
> I've tried what you have said but it's not showing me any entries on
> the query. Has the column heads but no data.
>
> Thanks
>
> Colin
> Jeff L wrote:
> > By "launch", are you just trying to open the query to see the results?
> > That would be
> > Docmd.OpenQuery "YourQueryName" You will need to explain a little
> > better if I missed what you are talking about.
> >
> > (E-Mail Removed) wrote:
> > > Hi
> > >
> > > Thanks for the info.
> > >
> > > I think I am going wrong somewhere. I am not trying to do the
> > > calculation just yet. I set the criteria as you said and I can see how
> > > it works. (Kicking myself for being so stupid as I've been using the
> > > same thing to perform other things on forms) How would I get the query
> > > to launch showing the selected criteria I have specified on the form?
> > >
> > > Thanks
> > >
> > > Colin
> > > Jeff L wrote:
> > > > Is there anyway a query field can reference what is in the fields of a
> > > > form?
> > > >
> > > > Yes. In the criteria of your query field, put
> > > > Forms!YourFormName!FormFieldName.
> > > >
> > > > Also, even if I were to do this all using seperate queries, how do I
> > > > get the form to display the totals?
> > > >
> > > > You can do this in the query itself or you can have a field on the form
> > > > perform the calculation. If you do it in the query, you will need to
> > > > use Totals. Click View, Totals. Then in the column you wish to add
> > > > up, put Sum in the Totals row for that field. You would then simply
> > > > add that field to your form. If you do the calculation on the form
> > > > itself, you would make a new textbox and put =Sum([YourFieldName]) in
> > > > the control source.
> > > >
> > > > Hope that helps!
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > (E-Mail Removed) wrote:
> > > > > Hi
> > > > >
> > > > > I am wanting to select information from two combo boxes and then show a
> > > > > total of how many entries match this criteria.
> > > > >
> > > > > At the moment to do this I will have to do a series of queries (9
> > > > > topics each with around 5 sub topics, a lot of queries) to get this
> > > > > information.
> > > > >
> > > > > Is there anyway a query field can reference what is in the fields of a
> > > > > form? Also, even if I were to do this all using seperate queries, how
> > > > > do I get the form to display the totals?
> > > > >
> > > > > Cheers
> > > > >
> > > > > Colin


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Would like to display the selected data from the combo box on to the form John W. Vinson Microsoft Access Forms 0 12th Feb 2009 06:45 AM
Display Calculated Fields and Save Data on Form lmgraham0629 Microsoft Access Forms 2 5th May 2008 04:44 PM
Adding New Display Fields in a Query to Show up on a Form =?Utf-8?B?TWlrZQ==?= Microsoft Access Forms 1 3rd Jun 2004 01:28 AM
Need macro to run query, open form and display query results in form fields denilynn Microsoft Access Macros 2 3rd Mar 2004 07:07 PM
form bound to query, display concatenated fields Ketaki Microsoft Access Forms 1 28th Aug 2003 08:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:21 PM.