Creating Report from filtered form

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top