Connecting Tech Pros Worldwide Forums | Help | Site Map

Forcing a Form View

David White
Guest
 
Posts: n/a
#1: Nov 13 '05
Hello everyone,

I'm new to access, so if this is a dumb question I apologize in
advance.

I created a query that requires a "parameter value" to be entered.
I then created a form to display the results of that query.

This worked fine and I am able to scroll throught the results of the
query in my form.

I then created a "command button" on the this form to call up the same
query as before.

The problem is that it displays the correct results, but only in
DATASHEET view.

How can I force it display the results in Form View.
(even a hammer won't work!)

Thanks,
Dave



fredg
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Forcing a Form View


On Thu, 04 Aug 2005 13:08:34 GMT, David White wrote:
[color=blue]
> Hello everyone,
>
> I'm new to access, so if this is a dumb question I apologize in
> advance.
>
> I created a query that requires a "parameter value" to be entered.
> I then created a form to display the results of that query.
>
> This worked fine and I am able to scroll throught the results of the
> query in my form.
>
> I then created a "command button" on the this form to call up the same
> query as before.
>
> The problem is that it displays the correct results, but only in
> DATASHEET view.
>
> How can I force it display the results in Form View.
> (even a hammer won't work!)
>
> Thanks,
> Dave[/color]

Did you set the Default Form View property to either Continuous Form
or Single Form View?
It's on the Form's Property Sheet's Format tab.
What is the command button click event code?

The best way to do this, however, is to set the query as the form's
Record Source. Open the form and the query will prompt for the
parameter. Enter the parameter and the form will automatically display
the query result. There is no need for a separate command button.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
fredg
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Forcing a Form View


On Thu, 04 Aug 2005 13:08:34 GMT, David White wrote:
[color=blue]
> Hello everyone,
>
> I'm new to access, so if this is a dumb question I apologize in
> advance.
>
> I created a query that requires a "parameter value" to be entered.
> I then created a form to display the results of that query.
>
> This worked fine and I am able to scroll throught the results of the
> query in my form.
>
> I then created a "command button" on the this form to call up the same
> query as before.
>
> The problem is that it displays the correct results, but only in
> DATASHEET view.
>
> How can I force it display the results in Form View.
> (even a hammer won't work!)
>
> Thanks,
> Dave[/color]

Did you set the Default Form View property to either Continuous Form
or Single Form View?
It's on the Form's Property Sheet's Format tab.
What is the command button click event code?

The best way to do this, however, is to set the query as the form's
Record Source. Open the form and the query will prompt for the
parameter. Enter the parameter and the form will automatically display
the query result. There is no need for a separate command button.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
David White
Guest
 
Posts: n/a
#4: Nov 13 '05

re: Forcing a Form View


On Thu, 4 Aug 2005 06:56:37 -0700, fredg <fgutkind@example.invalid>
wrote:

I Like your idea about Opening the form and then receive a prompt for
the display.

The query is, however, the form's Record Source

Is the problem caused by the facr that I intially used the Form Wizard
to set up the form using the Query instead of the Underlying table?
[color=blue]
>Did you set the Default Form View property to either Continuous Form
>or Single Form View?
>It's on the Form's Property Sheet's Format tab.
>What is the command button click event code?
>
>The best way to do this, however, is to set the query as the form's
>Record Source. Open the form and the query will prompt for the
>parameter. Enter the parameter and the form will automatically display
>the query result. There is no need for a separate command button.[/color]

David White
Guest
 
Posts: n/a
#5: Nov 13 '05

re: Forcing a Form View


On Thu, 4 Aug 2005 06:56:37 -0700, fredg <fgutkind@example.invalid>
wrote:

I Like your idea about Opening the form and then receive a prompt for
the display.

The query is, however, the form's Record Source

Is the problem caused by the facr that I intially used the Form Wizard
to set up the form using the Query instead of the Underlying table?
[color=blue]
>Did you set the Default Form View property to either Continuous Form
>or Single Form View?
>It's on the Form's Property Sheet's Format tab.
>What is the command button click event code?
>
>The best way to do this, however, is to set the query as the form's
>Record Source. Open the form and the query will prompt for the
>parameter. Enter the parameter and the form will automatically display
>the query result. There is no need for a separate command button.[/color]

Fred Zuckerman
Guest
 
Posts: n/a
#6: Nov 13 '05

re: Forcing a Form View


"David White" <djwhite@snet.net> wrote in message
news:te44f1phprmp53o4h7uv06fg3ao6qarf6b@4ax.com...[color=blue]
> Hello everyone,
>
> I'm new to access, so if this is a dumb question I apologize in
> advance.
>
> I created a query that requires a "parameter value" to be entered.
> I then created a form to display the results of that query.
>
> This worked fine and I am able to scroll throught the results of the
> query in my form.
>
> I then created a "command button" on the this form to call up the same
> query as before.
>
> The problem is that it displays the correct results, but only in
> DATASHEET view.
>
> How can I force it display the results in Form View.
> (even a hammer won't work!)
>
> Thanks,
> Dave
>[/color]
Dave,
It sounds like the problem is your command button. The "click" event is
likely set to open another query. Queries are always opened in datasheet
view. Try changing your "click" event to change the record source of the
form to the new query (instead of just opening the query).
Fred Zuckerman


Fred Zuckerman
Guest
 
Posts: n/a
#7: Nov 13 '05

re: Forcing a Form View


"David White" <djwhite@snet.net> wrote in message
news:te44f1phprmp53o4h7uv06fg3ao6qarf6b@4ax.com...[color=blue]
> Hello everyone,
>
> I'm new to access, so if this is a dumb question I apologize in
> advance.
>
> I created a query that requires a "parameter value" to be entered.
> I then created a form to display the results of that query.
>
> This worked fine and I am able to scroll throught the results of the
> query in my form.
>
> I then created a "command button" on the this form to call up the same
> query as before.
>
> The problem is that it displays the correct results, but only in
> DATASHEET view.
>
> How can I force it display the results in Form View.
> (even a hammer won't work!)
>
> Thanks,
> Dave
>[/color]
Dave,
It sounds like the problem is your command button. The "click" event is
likely set to open another query. Queries are always opened in datasheet
view. Try changing your "click" event to change the record source of the
form to the new query (instead of just opening the query).
Fred Zuckerman


fredg
Guest
 
Posts: n/a
#8: Nov 13 '05

re: Forcing a Form View


On Thu, 04 Aug 2005 14:12:48 GMT, David White wrote:
[color=blue]
> On Thu, 4 Aug 2005 06:56:37 -0700, fredg <fgutkind@example.invalid>
> wrote:
>
> I Like your idea about Opening the form and then receive a prompt for
> the display.
>
> The query is, however, the form's Record Source
>
> Is the problem caused by the facr that I intially used the Form Wizard
> to set up the form using the Query instead of the Underlying table?
>[color=green]
>>Did you set the Default Form View property to either Continuous Form
>>or Single Form View?
>>It's on the Form's Property Sheet's Format tab.
>>What is the command button click event code?
>>
>>The best way to do this, however, is to set the query as the form's
>>Record Source. Open the form and the query will prompt for the
>>parameter. Enter the parameter and the form will automatically display
>>the query result. There is no need for a separate command button.[/color][/color]

If the command button event code is something like:
DoCmd.OpenQuery "QueryName"
that will open the query as a query (in datasheet view).

I believe you are going about this incorrectly. If the Query is the
form's record source, that should be all you need to filter and show
the appropriate records after entering the parameter when prompted.

Why don't you use the built-in Filter-by-Selection or Filter-by-Form
tool buttons to filter within the filter?

No need for a command button.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
fredg
Guest
 
Posts: n/a
#9: Nov 13 '05

re: Forcing a Form View


On Thu, 04 Aug 2005 14:12:48 GMT, David White wrote:
[color=blue]
> On Thu, 4 Aug 2005 06:56:37 -0700, fredg <fgutkind@example.invalid>
> wrote:
>
> I Like your idea about Opening the form and then receive a prompt for
> the display.
>
> The query is, however, the form's Record Source
>
> Is the problem caused by the facr that I intially used the Form Wizard
> to set up the form using the Query instead of the Underlying table?
>[color=green]
>>Did you set the Default Form View property to either Continuous Form
>>or Single Form View?
>>It's on the Form's Property Sheet's Format tab.
>>What is the command button click event code?
>>
>>The best way to do this, however, is to set the query as the form's
>>Record Source. Open the form and the query will prompt for the
>>parameter. Enter the parameter and the form will automatically display
>>the query result. There is no need for a separate command button.[/color][/color]

If the command button event code is something like:
DoCmd.OpenQuery "QueryName"
that will open the query as a query (in datasheet view).

I believe you are going about this incorrectly. If the Query is the
form's record source, that should be all you need to filter and show
the appropriate records after entering the parameter when prompted.

Why don't you use the built-in Filter-by-Selection or Filter-by-Form
tool buttons to filter within the filter?

No need for a command button.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Dave White
Guest
 
Posts: n/a
#10: Nov 13 '05

re: Forcing a Form View


On Thu, 4 Aug 2005 09:16:44 -0700, fredg <fgutkind@example.invalid>
wrote:

Thank you both for your input.

I took your suggestion and created a filter by copying and pasting a
part of the Query in "SQL view" to the Form's Property-Filter Record.

I then created a Command button to apply the filter. Works great.

Thanks again,
Dave

Closed Thread