ACC1x: Invalid Reference: Previewing Graph Based on ParameterID: Q105657
|
The message
Invalid reference to field 'Field Name' in query
The data source for the graph is a parameter query. The parameter query is run one time to collect the values required to display the graph in Form view or print preview. Once the parameters are collected through the Enter Parameter Value box, they no longer exist. When you try to print the graph, the graph must be regenerated from the underlying data. Since the parameters are no longer available and are not prompted for again, the error message stated above is generated.
Rather than enter the parameters using the Enter Parameter Value box, the
parameters for the query should come from a source that is available while
the form is active. Modify the query so that the parameters are referenced
directly from a second form.
The following example demonstrates how to use a second form to collect the
values:
Form: Parameter Form
Text box
ControlName: Beginning Date
Text box
ControlName: Ending Date
Command button
Caption: Open Graph Form
OnPush: Graph Form.Open
MacroName Action Defined Below
-------------------------------------------
Open SetValue 1
OpenForm 2
Close Close 3
Graph Form Actions
------------------------------------------
1. SetValue
Item: Forms![Parameter Form].Visible
Expression: False
2. OpenForm
Form Name: Graph Form
View: Form
Filter Name: <leave empty>
Where Condition: <leave empty>
Data Mode: Edit
Window Mode: Normal
3. Close
Object Type: Form
Object Name: Parameter Form
Parameter Data type
------------------------------------------------------
Forms![Parameter Form]![Beginning Date] Date/Time
Forms![Parameter Form]![Ending Date] Date/Time
Microsoft has confirmed this to be a problem in Microsoft Access versions 1.0 and 1.1. This problem no longer occurs in Microsoft Access version 2.0.
Keywords : kbtool IntpGrph
Version : 1.0 1.1
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: March 27, 1999