By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,773 Members | 2,583 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,773 IT Pros & Developers. It's quick & easy.

Dialog Form, ComboBox, Filter and Report Blahs

P: n/a
The problem to resolve should be pretty easy for someone. I have a
main form which contains a combo box to lookup various vendors. Have
several reports for the vendors, but it is print all or none.

So here is what I have done and would like to stay on the same track.

1. Created a new vendor query (qryVendorRpt) with only the needed
fields including the combo box (cboVendorsMain) from the main form
(frmMain).

2. Of course, created a new vendor report (rptVendorDetail).

3. Created a Dialog Form (frmVendorDialog) that contains the
(cboVendors) combo box with its RowSource set to the Vendors Table
(tblVendors). Also included on the Dialog Form is Cancel (cmdClose)
button and an OK (cmdOkay) button which is set to Me.Visible = False.

4. Then inserted code behind the OnOpen report Event Procedure. The
code below obviously is not working and needs to be tweaked.
Suggestions are welcomed.

5. I want to be able to choose "All Vendors" as well as optionally
choosing a single one for report output.

DoCmd.OpenForm "frmVendorDialog",,,,,acDialog

Me!Vendors = Forms![frmVendorDialog]![cboVendors]

DoCmd.Close acForm, "frmVendorDialog"

If Me!Vendors <> "All Vendors" Then

DoCmd.ApplyFilter , "[Me!Vendors]='" & Vendors & "'"

End If

A couple of error codes noted - 2448 can't assign a value to this
object, 2450 can't find form.

Thanks for your assistance.
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.