Custom Dialog

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

I have created a custom dialog box which I am trying to
link to a select query. Basically, when a user chooses an
item from the combobox, I wish for a report to display
that shows information pertaining to their selection.
What I need is an example of a SQL statement that would
instruct the query to use the choice in the combobox as
the criteria for the information to be displayed in the
report. Also, I would need to know where to place the
triggers for the event.

Thanks so much!
Eric
 
I have created a custom dialog box which I am trying to
link to a select query. Basically, when a user chooses an
item from the combobox, I wish for a report to display
that shows information pertaining to their selection.
What I need is an example of a SQL statement that would
instruct the query to use the choice in the combobox as
the criteria for the information to be displayed in the
report. Also, I would need to know where to place the
triggers for the event.

Thanks so much!
Eric

Make the query the record source for the report.
Code the Report's Open Event:
DoCmd.OpenForm "FormName", , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "FormName"

Add a command button to the Form.
Code it's click event:
Me.Visible = False

In the query SQL, add:
Where YourTable.FieldName = forms!FormName!ComboName

Run the Report. The report will open the form.
When you enter the combo box value and click the command button, the
report will display. When you close the report, it will also close the
form.
You never see the query.
 
Back
Top