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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating Report from filtered form



 
 
Thread Tools Display Modes
  #1  
Old November 13th, 2006, 02:56 AM posted to microsoft.public.access.forms
Garry
external usenet poster
 
Posts: 37
Default Creating Report from filtered form

I have a form based on a table that has a command button to create a report
after a filter is applied. The command button executes the following code:
DoCmd.OpenReport "rptMovies7", acViewPreview, , Me.Filter
It does not work consistently. In particular there are 2 text boxes in the
form based on text fields in the table. The only difference between the text
fields is that one is the primary key so it is “required”. When I filter on
the primary key field (either using the filter by form or doing a “right
click” and “filter for”, the button works fine and creates a report based on
the filter. When I try to do the same on the other text field, the filter
works fine but when I click on the button I get a message box to “Enter a
Parameter Value” for “tblWork.txtComment”. (The field name is txtComment in
Table tblWork).

Also, the form has a combo box to enter an attribute, selected from an
attribute table (the primary key of the attribute is stored in the main
table). If I do a “filter by form” and select an attribute in the combo
box, the filter works fine, but when I click the command button I get a
message box saying “Enter A Parameter Value” for “Lookup_cboAttrib1.Type”.

Any ideas as to where to look? Is there a Form property that may not be set
properly?

Thanks in advance, Gsarry Gross

  #2  
Old November 13th, 2006, 03:01 AM posted to microsoft.public.access.forms
Tom Wickerath
external usenet poster
 
Posts: 3,914
Default Creating Report from filtered form

Hi Garry,

You might want to try Access MVP Armen Stein's report selection example:

http://www.jstreettech.com/cartgenie...rDownloads.asp


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/ex...tributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

"Garry" wrote:

I have a form based on a table that has a command button to create a report
after a filter is applied. The command button executes the following code:
DoCmd.OpenReport "rptMovies7", acViewPreview, , Me.Filter
It does not work consistently. In particular there are 2 text boxes in the
form based on text fields in the table. The only difference between the text
fields is that one is the primary key so it is “required”. When I filter on
the primary key field (either using the filter by form or doing a “right
click” and “filter for”, the button works fine and creates a report based on
the filter. When I try to do the same on the other text field, the filter
works fine but when I click on the button I get a message box to “Enter a
Parameter Value” for “tblWork.txtComment”. (The field name is txtComment in
Table tblWork).

Also, the form has a combo box to enter an attribute, selected from an
attribute table (the primary key of the attribute is stored in the main
table). If I do a “filter by form” and select an attribute in the combo
box, the filter works fine, but when I click the command button I get a
message box saying “Enter A Parameter Value” for “Lookup_cboAttrib1.Type”.

Any ideas as to where to look? Is there a Form property that may not be set
properly?

Thanks in advance, Garry Gross

 




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


All times are GMT +1. The time now is 01:14 PM.


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