I have a form the runs reports based on a 2 values entered manually into text boxes. I would like to set default values for these boxes, but the values change twice daily.
I've written a make table query that creates a table with the values I would like (only 1 record).
I've inserted a macro that runs the query into the on load event of the form.
I entered the table and field references into the default value properties of the text boxes.
The macro runs the query and the table is created, but #Name? shows in the text boxes instead of the value from the table.
The form works when the values are entered manually.
The only thought I had was that I'm not specifying which record I want even though there is only one. Do I have to create a primary key and use that in the default value reference?
Thanks
I've written a make table query that creates a table with the values I would like (only 1 record).
I've inserted a macro that runs the query into the on load event of the form.
I entered the table and field references into the default value properties of the text boxes.
The macro runs the query and the table is created, but #Name? shows in the text boxes instead of the value from the table.
The form works when the values are entered manually.
The only thought I had was that I'm not specifying which record I want even though there is only one. Do I have to create a primary key and use that in the default value reference?
Thanks