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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|