A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

running a querys using a form



 
 
Thread Tools Display Modes
  #1  
Old March 10th, 2006, 04:43 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default running a querys using a form

Hi everybody. I have a few questions I'm hoping someone can help me with:

1. I have a command button on a form that runs 2 querys. First query is to
select the information between a date range and the second query is to do a
count (total). I would like the second query results to pop up in front of
the form. I don't need to see the results from the first query.

2. I also have a command button to run a report. This does pop up in front
of the form, but I would like to be able to see the toolbar that contains
FilePrint, so that users can report out the report.

Thanks very much,
Zaps

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200603/1
  #2  
Old March 10th, 2006, 06:49 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default running a querys using a form

Zaps:

If you don't need to see the results of the first query then why open it at
all? Just open the second query which returns the count. If this second
query references the first one you don't have to open it independently, the
second one will reference it transparently behind the scenes. If you are
simply counting the rows returned by the first query you might not even need
to open the second one, but instead use the DCount function to count the
rows. You could just open an unbound dialogue form on top of the first form:

DoCmd.OpenForm "frmCountRows", WindowMode:=acDialog

The frmCountRows form would have a text box on it with a ControlSource such
as:

=DCount("*","YourFirstQuery")

I don't understand your second question. As After opening a report in print
preview you should get the normal report menu and toolbar while the report
has the focus.

Ken Sheridan
Stafford, England

"zaps via AccessMonster.com" wrote:

Hi everybody. I have a few questions I'm hoping someone can help me with:

1. I have a command button on a form that runs 2 querys. First query is to
select the information between a date range and the second query is to do a
count (total). I would like the second query results to pop up in front of
the form. I don't need to see the results from the first query.

2. I also have a command button to run a report. This does pop up in front
of the form, but I would like to be able to see the toolbar that contains
FilePrint, so that users can report out the report.

Thanks very much,
Zaps

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200603/1

  #3  
Old March 10th, 2006, 06:49 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default running a querys using a form

Zaps:

If you don't need to see the results of the first query then why open it at
all? Just open the second query which returns the count. If this second
query references the first one you don't have to open it independently, the
second one will reference it transparently behind the scenes. If you are
simply counting the rows returned by the first query you might not even need
to open the second one, but instead use the DCount function to count the
rows. You could just open an unbound dialogue form on top of the first form:

DoCmd.OpenForm "frmCountRows", WindowMode:=acDialog

The frmCountRows form would have a text box on it with a ControlSource such
as:

=DCount("*","YourFirstQuery")

I don't understand your second question. As After opening a report in print
preview you should get the normal report menu and toolbar while the report
has the focus.

Ken Sheridan
Stafford, England

"zaps via AccessMonster.com" wrote:

Hi everybody. I have a few questions I'm hoping someone can help me with:

1. I have a command button on a form that runs 2 querys. First query is to
select the information between a date range and the second query is to do a
count (total). I would like the second query results to pop up in front of
the form. I don't need to see the results from the first query.

2. I also have a command button to run a report. This does pop up in front
of the form, but I would like to be able to see the toolbar that contains
FilePrint, so that users can report out the report.

Thanks very much,
Zaps

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200603/1

  #4  
Old March 10th, 2006, 08:54 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default running a querys using a form

Thanks Ken! Works Great!

For my other question, I think I need to explain it better (or try to). When
the user signs onto the database, the form opens to "add new entry". Users
do not have any excess to go behind the form, or do anything other than use
the buttons on the form. The form takes up the whole screen, and does not
show any toolbars. When the user clicks the button to run a report, the
report pops up in front of the from, but does not show any toolbars either.
The top of the report shows the name of the report (rpt_SurveyDetails) and
thats it.

Thanks again,
Zaps

Ken Sheridan wrote:
Zaps:

If you don't need to see the results of the first query then why open it at
all? Just open the second query which returns the count. If this second
query references the first one you don't have to open it independently, the
second one will reference it transparently behind the scenes. If you are
simply counting the rows returned by the first query you might not even need
to open the second one, but instead use the DCount function to count the
rows. You could just open an unbound dialogue form on top of the first form:

DoCmd.OpenForm "frmCountRows", WindowMode:=acDialog

The frmCountRows form would have a text box on it with a ControlSource such
as:

=DCount("*","YourFirstQuery")

I don't understand your second question. As After opening a report in print
preview you should get the normal report menu and toolbar while the report
has the focus.

Ken Sheridan
Stafford, England

Hi everybody. I have a few questions I'm hoping someone can help me with:

[quoted text clipped - 9 lines]
Thanks very much,
Zaps


--
Message posted via http://www.accessmonster.com
  #5  
Old March 10th, 2006, 08:54 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default running a querys using a form

Thanks Ken! Works Great!

For my other question, I think I need to explain it better (or try to). When
the user signs onto the database, the form opens to "add new entry". Users
do not have any excess to go behind the form, or do anything other than use
the buttons on the form. The form takes up the whole screen, and does not
show any toolbars. When the user clicks the button to run a report, the
report pops up in front of the from, but does not show any toolbars either.
The top of the report shows the name of the report (rpt_SurveyDetails) and
thats it.

Thanks again,
Zaps

Ken Sheridan wrote:
Zaps:

If you don't need to see the results of the first query then why open it at
all? Just open the second query which returns the count. If this second
query references the first one you don't have to open it independently, the
second one will reference it transparently behind the scenes. If you are
simply counting the rows returned by the first query you might not even need
to open the second one, but instead use the DCount function to count the
rows. You could just open an unbound dialogue form on top of the first form:

DoCmd.OpenForm "frmCountRows", WindowMode:=acDialog

The frmCountRows form would have a text box on it with a ControlSource such
as:

=DCount("*","YourFirstQuery")

I don't understand your second question. As After opening a report in print
preview you should get the normal report menu and toolbar while the report
has the focus.

Ken Sheridan
Stafford, England

Hi everybody. I have a few questions I'm hoping someone can help me with:

[quoted text clipped - 9 lines]
Thanks very much,
Zaps


--
Message posted via http://www.accessmonster.com
  #6  
Old March 10th, 2006, 10:23 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default running a querys using a form

I have been fiddling around with the yes/no in the modal (in the form
properties under other). When I try and run the report now I get this error
message:

Run-time error '7794'
Microsoft Office Access couldn't find the toolbar ' '.

Help! What have I done!

zaps wrote:
Thanks Ken! Works Great!

For my other question, I think I need to explain it better (or try to). When
the user signs onto the database, the form opens to "add new entry". Users
do not have any excess to go behind the form, or do anything other than use
the buttons on the form. The form takes up the whole screen, and does not
show any toolbars. When the user clicks the button to run a report, the
report pops up in front of the from, but does not show any toolbars either.
The top of the report shows the name of the report (rpt_SurveyDetails) and
thats it.

Thanks again,
Zaps

Zaps:

[quoted text clipped - 25 lines]
Thanks very much,
Zaps


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200603/1
  #7  
Old March 10th, 2006, 10:23 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default running a querys using a form

I have been fiddling around with the yes/no in the modal (in the form
properties under other). When I try and run the report now I get this error
message:

Run-time error '7794'
Microsoft Office Access couldn't find the toolbar ' '.

Help! What have I done!

zaps wrote:
Thanks Ken! Works Great!

For my other question, I think I need to explain it better (or try to). When
the user signs onto the database, the form opens to "add new entry". Users
do not have any excess to go behind the form, or do anything other than use
the buttons on the form. The form takes up the whole screen, and does not
show any toolbars. When the user clicks the button to run a report, the
report pops up in front of the from, but does not show any toolbars either.
The top of the report shows the name of the report (rpt_SurveyDetails) and
thats it.

Thanks again,
Zaps

Zaps:

[quoted text clipped - 25 lines]
Thanks very much,
Zaps


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200603/1
  #8  
Old March 10th, 2006, 11:07 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default running a querys using a form

Zaps:

I'd drafted the reply below just before seeing your latest post. It sounds
as though you might possibly be using the Modal and Popup properties to
control the form after all. My recommendation would be to set both to False
(No in the properties sheet), to maximize the form on opening if you want it
to fill the application window, and to create a custom menu and toolbar for
your reports. Deny access to menus and built in toolbars in the start up
dialogue (you can by-pass the start up options for development purposes by
holding down the Shift key when you open the application – though that too
can be disabled, but that's another story). In the same dialogue give the
application a suitable title, and icon if you wish; these will show on the
application window's title bar. Make sure the Menu and Toolbar properties
for all forms are left blank unless you design custom menus/toolbars for them
too. You'll then just get the minimal menu with them.

To my mind the overall effect of running an application within its own
maximized and appropriately titled window is much better than filling the
screen with one giant form and accords with users' experience generally when
running Windows applications, i.e. within Windows.

FWIW here's my original reply:

Sounds like you might be either opening the database with a maximized form
whose modal and pop up properties are both set to True; this fills the screen
with the form and hides everything else including the Access window itself.
Or you might be denying access to full menus and built in toolbars in the
start up options; this shows only a minimal menu bar. From what you say my
guess would be that it’s the latter of these. While I've seen the former
done, its not an approach I'd recommend.

When you deny full menus and built in toolbars this is usually when you
include custom menus and toolbars in the application, attaching the relevant
one's to each form or report object as their MenuBar and Toolbar properties.
You can then include whatever menu items/toolbar buttons you want for each
form or report object. As you'll generally want the same options to be
available for all reports you only need design one menu and toolbar which you
can use for all of them. With forms the options will probably differ from
form to form so more custom menus and toolbars would be required. Many
people rely on command buttons on forms rather than menu or toolbar buttons,
however, so one approach would be to use custom menus/toolbars for reports
only.

If you do use custom menus and toolbars resist the temptation to include too
much in them. I once had to do some work on a database developed by somebody
else which had so many options available via the custom menus that the result
was one of almost total confusion for the user!

Ken Sheridan
Stafford, England

"zaps via AccessMonster.com" wrote:

I have been fiddling around with the yes/no in the modal (in the form
properties under other). When I try and run the report now I get this error
message:

Run-time error '7794'
Microsoft Office Access couldn't find the toolbar ' '.

Help! What have I done!

zaps wrote:
Thanks Ken! Works Great!

For my other question, I think I need to explain it better (or try to). When
the user signs onto the database, the form opens to "add new entry". Users
do not have any excess to go behind the form, or do anything other than use
the buttons on the form. The form takes up the whole screen, and does not
show any toolbars. When the user clicks the button to run a report, the
report pops up in front of the from, but does not show any toolbars either.
The top of the report shows the name of the report (rpt_SurveyDetails) and
thats it.

Thanks again,
Zaps

Zaps:

[quoted text clipped - 25 lines]
Thanks very much,
Zaps


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200603/1

  #9  
Old March 10th, 2006, 11:07 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default running a querys using a form

Zaps:

I'd drafted the reply below just before seeing your latest post. It sounds
as though you might possibly be using the Modal and Popup properties to
control the form after all. My recommendation would be to set both to False
(No in the properties sheet), to maximize the form on opening if you want it
to fill the application window, and to create a custom menu and toolbar for
your reports. Deny access to menus and built in toolbars in the start up
dialogue (you can by-pass the start up options for development purposes by
holding down the Shift key when you open the application – though that too
can be disabled, but that's another story). In the same dialogue give the
application a suitable title, and icon if you wish; these will show on the
application window's title bar. Make sure the Menu and Toolbar properties
for all forms are left blank unless you design custom menus/toolbars for them
too. You'll then just get the minimal menu with them.

To my mind the overall effect of running an application within its own
maximized and appropriately titled window is much better than filling the
screen with one giant form and accords with users' experience generally when
running Windows applications, i.e. within Windows.

FWIW here's my original reply:

Sounds like you might be either opening the database with a maximized form
whose modal and pop up properties are both set to True; this fills the screen
with the form and hides everything else including the Access window itself.
Or you might be denying access to full menus and built in toolbars in the
start up options; this shows only a minimal menu bar. From what you say my
guess would be that it’s the latter of these. While I've seen the former
done, its not an approach I'd recommend.

When you deny full menus and built in toolbars this is usually when you
include custom menus and toolbars in the application, attaching the relevant
one's to each form or report object as their MenuBar and Toolbar properties.
You can then include whatever menu items/toolbar buttons you want for each
form or report object. As you'll generally want the same options to be
available for all reports you only need design one menu and toolbar which you
can use for all of them. With forms the options will probably differ from
form to form so more custom menus and toolbars would be required. Many
people rely on command buttons on forms rather than menu or toolbar buttons,
however, so one approach would be to use custom menus/toolbars for reports
only.

If you do use custom menus and toolbars resist the temptation to include too
much in them. I once had to do some work on a database developed by somebody
else which had so many options available via the custom menus that the result
was one of almost total confusion for the user!

Ken Sheridan
Stafford, England

"zaps via AccessMonster.com" wrote:

I have been fiddling around with the yes/no in the modal (in the form
properties under other). When I try and run the report now I get this error
message:

Run-time error '7794'
Microsoft Office Access couldn't find the toolbar ' '.

Help! What have I done!

zaps wrote:
Thanks Ken! Works Great!

For my other question, I think I need to explain it better (or try to). When
the user signs onto the database, the form opens to "add new entry". Users
do not have any excess to go behind the form, or do anything other than use
the buttons on the form. The form takes up the whole screen, and does not
show any toolbars. When the user clicks the button to run a report, the
report pops up in front of the from, but does not show any toolbars either.
The top of the report shows the name of the report (rpt_SurveyDetails) and
thats it.

Thanks again,
Zaps

Zaps:

[quoted text clipped - 25 lines]
Thanks very much,
Zaps


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200603/1

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Date range on reports Mark_Milly Setting Up & Running Reports 10 January 19th, 2006 03:49 PM
Form won't open report from preview button jwr Using Forms 5 October 29th, 2005 04:53 PM
strategy for data entry in multiple tables LAF Using Forms 18 April 25th, 2005 04:04 AM
Need to clear controls of Filter form Jan Il Using Forms 2 November 28th, 2004 02:04 PM
auto entry into second table after update Tony New Users 13 July 9th, 2004 10:42 PM


All times are GMT +1. The time now is 04:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.