Property | Setting |
---|---|
Caption | Name you want to appear in the title bar of the form |
DefaultView | Single Form |
ViewsAllowed | Form |
ScrollBars | Neither |
RecordSelectors | No |
NavigationButtons | No |
BorderStyle | Dialog |
Property | Setting |
---|---|
Name | Name that describes the type of criteria; for example, BeginningDate. |
Format | Format that reflects the data type of the criteria. For example, for a date criteria, select a format such as Medium Date. |
You'll add OK and Cancel command buttons to the form after you create macros for them.
For this procedure, you'll create four macros in a macro group.
Argument | Setting |
---|---|
Form Name | Name of the unbound form; for example, Sales Dialog |
View | Form |
Data Mode | Edit |
Window Mode | Dialog |
Add a second action, CancelEvent, that cancels previewing or printing the report when the Cancel button on the form is clicked. Then click Conditions to display the Condition column, and type the following expression in the Condition column:
Not IsLoaded("Sales Dialog")
IsLoaded is a function defined in the Utility Functions module in the Northwind sample database. It's used to check whether a form is open in Form view or Datasheet view. You must define the IsLoaded function in your database before you can use it. (You can copy and paste this function into a utility module in your database.) For information on defining a function, click . For information about opening Northwind, click .
Argument | Setting |
---|---|
Object Type | Form |
Object Name | Name of the unbound form |
Save | No |
Argument | Setting |
---|---|
Item | [Visible] |
Expression | No |
Argument | Setting |
---|---|
Object Type | Form |
Object Name | Name of the unbound form |
Save | No |
Property | Setting |
---|---|
Name | OK |
Caption | OK |
Default | Yes |
OnClick | Name of the macro; for example, Sales Dialog.OK |
Property | Setting |
---|---|
Name | Cancel |
Caption | Cancel |
OnClick | Name of the macro; for example, Sales Dialog.Cancel |
Between [Forms]![Sales Dialog]![Beginning Date] And [Forms]![Sales Dialog]![Ending Date]
@Beginning_Date datetime, @Ending_Date datetime
and then use those parameters in the WHERE clause; for example:
WHERE Sales.ShippedDate Between @Beginning_Date And @Ending_Date
In an Access project, you set the reference to the controls on the form in the InputParameters property in the report, as shown in the next procedure.
@Beginning_date datetime = [Forms]![Sales Dialog]![Beginning Date], @Ending_date datetime = [Forms]![Sales Dialog]![Ending Date]
Property | Setting |
---|---|
OnOpen | Name of the macro that opens the unbound form; for example, Sales Dialog.Open Dialog |
OnClose | Name of the macro that closes the unbound form; for example, Sales Dialog.Close Dialog |