'Enter Parameter Value'

G

Guest

Does anybody have a permanent fix for the 'enter parameter value" dialog box
that pops up after closing my query dialog form.
I have gone back and looked at my query, the record source of my combo box.
I even used some code that will set the recordsource value of the combo box
to null, just before the DCmd.Close command. I just can't get this thing to
stop.
I also tried the suggestions on microsoft's website. Been working on this
for a week, and it's starting to become a pain to solve.

Scenario - Select a report from my reports menu, Custom Query Dialog form
appears: {combo box, two command buttons( Open/Close)
Problem happens when I click on the close button.

Record source of combo box. - SELECT tblSopNumbers.ControlNumber FROM
tblSopNumbers;

SQL Code for query that report is based on -

SELECT tblTraining.EmployeeID, tblSopNumbers.ControlNumber,
tblTraining.Training_Validation, tblTraining.TrainingDate
FROM tblTraining INNER JOIN tblSopNumbers ON tblTraining.ControlNumber =
tblSopNumbers.ControlNumber
WHERE (((tblSopNumbers.ControlNumber)=[Forms]![frmTraining Summary By
SOP]![cboSop]) AND ((tblTraining.Training_Validation)='Yes'));
 
J

Jeff Boyce

I ran into a similar (?the same) problem in an earlier version of Access.
The prompt was a bug somehow related to having Maximized the form when it
opened. By adding a DoCmd.Restore into the OnClose event procedure, it
bypassed the bug.

Regards (and Good Luck!)

Jeff Boyce
Microsoft Office/Access MVP
 
J

John Spencer

You can't close the form until you close the report. You can set the form's
visible property to No. And in the close event of the report, close the
form.

The query the report is based on uses the values of the controls on the
form. When you close the form, the controls are no longer available.
 
G

Guest

Where do I set the form's visible property to No - Is it in the Report's
close event ?

John Spencer said:
You can't close the form until you close the report. You can set the form's
visible property to No. And in the close event of the report, close the
form.

The query the report is based on uses the values of the controls on the
form. When you close the form, the controls are no longer available.


Olu Solaru said:
Does anybody have a permanent fix for the 'enter parameter value" dialog
box
that pops up after closing my query dialog form.
I have gone back and looked at my query, the record source of my combo
box.
I even used some code that will set the recordsource value of the combo
box
to null, just before the DCmd.Close command. I just can't get this thing
to
stop.
I also tried the suggestions on microsoft's website. Been working on this
for a week, and it's starting to become a pain to solve.

Scenario - Select a report from my reports menu, Custom Query Dialog form
appears: {combo box, two command buttons( Open/Close)
Problem happens when I click on the close button.

Record source of combo box. - SELECT tblSopNumbers.ControlNumber FROM
tblSopNumbers;

SQL Code for query that report is based on -

SELECT tblTraining.EmployeeID, tblSopNumbers.ControlNumber,
tblTraining.Training_Validation, tblTraining.TrainingDate
FROM tblTraining INNER JOIN tblSopNumbers ON tblTraining.ControlNumber =
tblSopNumbers.ControlNumber
WHERE (((tblSopNumbers.ControlNumber)=[Forms]![frmTraining Summary By
SOP]![cboSop]) AND ((tblTraining.Training_Validation)='Yes'));
 
J

John Spencer

No, in the report's close event is where you would close the form.
What event are you currently using to close the form? Instead of closing
the form in that event, set the form's visible property to false.

Do you have a button on the form to close the form? If so, change the code
in the button so it doesn't close the form, but sets the form's visible
property to false.

Forms!YourFormName.Visible = False

Olu Solaru said:
Where do I set the form's visible property to No - Is it in the Report's
close event ?

John Spencer said:
You can't close the form until you close the report. You can set the
form's
visible property to No. And in the close event of the report, close the
form.

The query the report is based on uses the values of the controls on the
form. When you close the form, the controls are no longer available.


Olu Solaru said:
Does anybody have a permanent fix for the 'enter parameter value"
dialog
box
that pops up after closing my query dialog form.
I have gone back and looked at my query, the record source of my combo
box.
I even used some code that will set the recordsource value of the combo
box
to null, just before the DCmd.Close command. I just can't get this
thing
to
stop.
I also tried the suggestions on microsoft's website. Been working on
this
for a week, and it's starting to become a pain to solve.

Scenario - Select a report from my reports menu, Custom Query Dialog
form
appears: {combo box, two command buttons( Open/Close)
Problem happens when I click on the close button.

Record source of combo box. - SELECT tblSopNumbers.ControlNumber FROM
tblSopNumbers;

SQL Code for query that report is based on -

SELECT tblTraining.EmployeeID, tblSopNumbers.ControlNumber,
tblTraining.Training_Validation, tblTraining.TrainingDate
FROM tblTraining INNER JOIN tblSopNumbers ON tblTraining.ControlNumber
=
tblSopNumbers.ControlNumber
WHERE (((tblSopNumbers.ControlNumber)=[Forms]![frmTraining Summary By
SOP]![cboSop]) AND ((tblTraining.Training_Validation)='Yes'));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top