Enter Parameter Box pops up even though its not in query

M

Mark909

I set up a Form to create a report using a Text Box as a form control.

A Control Button is set up to open the report.

In the criteria selection of the query i have:

[Forms]![frmParam]![txtObject_ID]

Correct me if im wrong but i should just be able to type in the object id.
The press the control button and the report will open showing the information
i selected in the query.

However I get an Enter Parameter box that pops up asking for the Project_ID.
However I ahve nothing in the query asking for the Project_ID parameter. The
query is also just based on one table. Theres no relationships.

Any ideas how to get rid of the Enter Parameter box?
 
D

Douglas J. Steele

Do you get the prompt for Project_ID if you run the query by itself (i.e.:
not opening the form for which it's the recordsource?) If not, are you
attempting to use Project_ID anywhere on the form?

If you get the prompt running the query by itself, is the query based on
another query that has a parameter?
 
M

Mark909

Thanks for the reply Douglas. FYI:

No i do not get the prompt when I run the query by itself

Project_ID is not used anywhere on the form.

The only place Project_ID is is in the orginal table but I dont include it
anywhere in the query.

The query is not based on another query that has a parameter.

The only information Im using is from the original table

Douglas J. Steele said:
Do you get the prompt for Project_ID if you run the query by itself (i.e.:
not opening the form for which it's the recordsource?) If not, are you
attempting to use Project_ID anywhere on the form?

If you get the prompt running the query by itself, is the query based on
another query that has a parameter?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Mark909 said:
I set up a Form to create a report using a Text Box as a form control.

A Control Button is set up to open the report.

In the criteria selection of the query i have:

[Forms]![frmParam]![txtObject_ID]

Correct me if im wrong but i should just be able to type in the object id.
The press the control button and the report will open showing the
information
i selected in the query.

However I get an Enter Parameter box that pops up asking for the
Project_ID.
However I ahve nothing in the query asking for the Project_ID parameter.
The
query is also just based on one table. Theres no relationships.

Any ideas how to get rid of the Enter Parameter box?
 
A

Allen Browne

You may find that Project_ID is in some property of the form, such as Filter
or OrderBy. You can use this code to find where the name is used in your
form:
http://allenbrowne.com/ser-73.html

It it is not there anywhere, make sure you have Name AutoCorrect turned off
and then compact/repair the database. Explanation of why
http://allenbrowne.com/bug-03.html

If you are still stuck after this, use this undocumented approach to save
your form as a text file:
SaveAsText acForm, "Form1", "C:\SomeFolder\Form1.txt"
Then search the text file for Project_ID.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Mark909 said:
Thanks for the reply Douglas. FYI:

No i do not get the prompt when I run the query by itself

Project_ID is not used anywhere on the form.

The only place Project_ID is is in the orginal table but I dont include it
anywhere in the query.

The query is not based on another query that has a parameter.

The only information Im using is from the original table

Douglas J. Steele said:
Do you get the prompt for Project_ID if you run the query by itself
(i.e.:
not opening the form for which it's the recordsource?) If not, are you
attempting to use Project_ID anywhere on the form?

If you get the prompt running the query by itself, is the query based on
another query that has a parameter?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Mark909 said:
I set up a Form to create a report using a Text Box as a form control.

A Control Button is set up to open the report.

In the criteria selection of the query i have:

[Forms]![frmParam]![txtObject_ID]

Correct me if im wrong but i should just be able to type in the object
id.
The press the control button and the report will open showing the
information
i selected in the query.

However I get an Enter Parameter box that pops up asking for the
Project_ID.
However I ahve nothing in the query asking for the Project_ID
parameter.
The
query is also just based on one table. Theres no relationships.

Any ideas how to get rid of the Enter Parameter box?
 
M

Mark909

Ive using the same Table as the basis for multiple queries. Some involve the
Project_ID coulumn some dont. Im not sure if this would be the cause or not?


Allen Browne said:
You may find that Project_ID is in some property of the form, such as Filter
or OrderBy. You can use this code to find where the name is used in your
form:
http://allenbrowne.com/ser-73.html

It it is not there anywhere, make sure you have Name AutoCorrect turned off
and then compact/repair the database. Explanation of why
http://allenbrowne.com/bug-03.html

If you are still stuck after this, use this undocumented approach to save
your form as a text file:
SaveAsText acForm, "Form1", "C:\SomeFolder\Form1.txt"
Then search the text file for Project_ID.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Mark909 said:
Thanks for the reply Douglas. FYI:

No i do not get the prompt when I run the query by itself

Project_ID is not used anywhere on the form.

The only place Project_ID is is in the orginal table but I dont include it
anywhere in the query.

The query is not based on another query that has a parameter.

The only information Im using is from the original table

Douglas J. Steele said:
Do you get the prompt for Project_ID if you run the query by itself
(i.e.:
not opening the form for which it's the recordsource?) If not, are you
attempting to use Project_ID anywhere on the form?

If you get the prompt running the query by itself, is the query based on
another query that has a parameter?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I set up a Form to create a report using a Text Box as a form control.

A Control Button is set up to open the report.

In the criteria selection of the query i have:

[Forms]![frmParam]![txtObject_ID]

Correct me if im wrong but i should just be able to type in the object
id.
The press the control button and the report will open showing the
information
i selected in the query.

However I get an Enter Parameter box that pops up asking for the
Project_ID.
However I ahve nothing in the query asking for the Project_ID
parameter.
The
query is also just based on one table. Theres no relationships.

Any ideas how to get rid of the Enter Parameter box?
 
B

BruceM

If you used a query with Project_ID as the basis for a form, added a control
bound to Project_ID or used Project_ID as a property of the form, then
edited the query to exclude Project_ID or changed to another query that did
not include Project_ID, you could have the problem. Did you check the
Property Sheet? Is Project_ID in the row source of any combo boxes or list
boxes? Any luck using the code to find the name?


Mark909 said:
Ive using the same Table as the basis for multiple queries. Some involve
the
Project_ID coulumn some dont. Im not sure if this would be the cause or
not?


Allen Browne said:
You may find that Project_ID is in some property of the form, such as
Filter
or OrderBy. You can use this code to find where the name is used in your
form:
http://allenbrowne.com/ser-73.html

It it is not there anywhere, make sure you have Name AutoCorrect turned
off
and then compact/repair the database. Explanation of why
http://allenbrowne.com/bug-03.html

If you are still stuck after this, use this undocumented approach to save
your form as a text file:
SaveAsText acForm, "Form1", "C:\SomeFolder\Form1.txt"
Then search the text file for Project_ID.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Mark909 said:
Thanks for the reply Douglas. FYI:

No i do not get the prompt when I run the query by itself

Project_ID is not used anywhere on the form.

The only place Project_ID is is in the orginal table but I dont include
it
anywhere in the query.

The query is not based on another query that has a parameter.

The only information Im using is from the original table

:

Do you get the prompt for Project_ID if you run the query by itself
(i.e.:
not opening the form for which it's the recordsource?) If not, are you
attempting to use Project_ID anywhere on the form?

If you get the prompt running the query by itself, is the query based
on
another query that has a parameter?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I set up a Form to create a report using a Text Box as a form
control.

A Control Button is set up to open the report.

In the criteria selection of the query i have:

[Forms]![frmParam]![txtObject_ID]

Correct me if im wrong but i should just be able to type in the
object
id.
The press the control button and the report will open showing the
information
i selected in the query.

However I get an Enter Parameter box that pops up asking for the
Project_ID.
However I ahve nothing in the query asking for the Project_ID
parameter.
The
query is also just based on one table. Theres no relationships.

Any ideas how to get rid of the Enter Parameter box?
 
M

Mark909

"If you used a query with Project_ID as the basis for a form, added a control
bound to Project_ID or used Project_ID as a property of the form, then
edited the query to exclude Project_ID or changed to another query that did
not include Project_ID, you could have the problem"

YES! that sounds exactly what ive done. Ive been building a database up from
scratch teaching myself as I go along. I initially started using Enter
Parameter for selection in queries, creating forms, etc. Once i learned about
the [Forms]![frmParam]![txtProject_ID] criteria i edited out the Enter
Parameter criteria and replaced it with that.

I tired using the code but couldnt get it to work. Im having trouble filling
out ? FindField()

BruceM said:
If you used a query with Project_ID as the basis for a form, added a control
bound to Project_ID or used Project_ID as a property of the form, then
edited the query to exclude Project_ID or changed to another query that did
not include Project_ID, you could have the problem. Did you check the
Property Sheet? Is Project_ID in the row source of any combo boxes or list
boxes? Any luck using the code to find the name?


Mark909 said:
Ive using the same Table as the basis for multiple queries. Some involve
the
Project_ID coulumn some dont. Im not sure if this would be the cause or
not?


Allen Browne said:
You may find that Project_ID is in some property of the form, such as
Filter
or OrderBy. You can use this code to find where the name is used in your
form:
http://allenbrowne.com/ser-73.html

It it is not there anywhere, make sure you have Name AutoCorrect turned
off
and then compact/repair the database. Explanation of why
http://allenbrowne.com/bug-03.html

If you are still stuck after this, use this undocumented approach to save
your form as a text file:
SaveAsText acForm, "Form1", "C:\SomeFolder\Form1.txt"
Then search the text file for Project_ID.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Thanks for the reply Douglas. FYI:

No i do not get the prompt when I run the query by itself

Project_ID is not used anywhere on the form.

The only place Project_ID is is in the orginal table but I dont include
it
anywhere in the query.

The query is not based on another query that has a parameter.

The only information Im using is from the original table

:

Do you get the prompt for Project_ID if you run the query by itself
(i.e.:
not opening the form for which it's the recordsource?) If not, are you
attempting to use Project_ID anywhere on the form?

If you get the prompt running the query by itself, is the query based
on
another query that has a parameter?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I set up a Form to create a report using a Text Box as a form
control.

A Control Button is set up to open the report.

In the criteria selection of the query i have:

[Forms]![frmParam]![txtObject_ID]

Correct me if im wrong but i should just be able to type in the
object
id.
The press the control button and the report will open showing the
information
i selected in the query.

However I get an Enter Parameter box that pops up asking for the
Project_ID.
However I ahve nothing in the query asking for the Project_ID
parameter.
The
query is also just based on one table. Theres no relationships.

Any ideas how to get rid of the Enter Parameter box?
 
B

BruceM

Assuming you have placed the code in a standard module as described, to find
the field press Ctrl + G to open the immediate code window, where you type
?FindField("FieldName"). "FieldName" is the parameter prompt you have been
receiving.

First read and follow any instructions from the link Allen sent about the
Name AutoCorrect bug.


Mark909 said:
"If you used a query with Project_ID as the basis for a form, added a
control
bound to Project_ID or used Project_ID as a property of the form, then
edited the query to exclude Project_ID or changed to another query that
did
not include Project_ID, you could have the problem"

YES! that sounds exactly what ive done. Ive been building a database up
from
scratch teaching myself as I go along. I initially started using Enter
Parameter for selection in queries, creating forms, etc. Once i learned
about
the [Forms]![frmParam]![txtProject_ID] criteria i edited out the Enter
Parameter criteria and replaced it with that.

I tired using the code but couldnt get it to work. Im having trouble
filling
out ? FindField()

BruceM said:
If you used a query with Project_ID as the basis for a form, added a
control
bound to Project_ID or used Project_ID as a property of the form, then
edited the query to exclude Project_ID or changed to another query that
did
not include Project_ID, you could have the problem. Did you check the
Property Sheet? Is Project_ID in the row source of any combo boxes or
list
boxes? Any luck using the code to find the name?


Mark909 said:
Ive using the same Table as the basis for multiple queries. Some
involve
the
Project_ID coulumn some dont. Im not sure if this would be the cause or
not?


:

You may find that Project_ID is in some property of the form, such as
Filter
or OrderBy. You can use this code to find where the name is used in
your
form:
http://allenbrowne.com/ser-73.html

It it is not there anywhere, make sure you have Name AutoCorrect
turned
off
and then compact/repair the database. Explanation of why
http://allenbrowne.com/bug-03.html

If you are still stuck after this, use this undocumented approach to
save
your form as a text file:
SaveAsText acForm, "Form1", "C:\SomeFolder\Form1.txt"
Then search the text file for Project_ID.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Thanks for the reply Douglas. FYI:

No i do not get the prompt when I run the query by itself

Project_ID is not used anywhere on the form.

The only place Project_ID is is in the orginal table but I dont
include
it
anywhere in the query.

The query is not based on another query that has a parameter.

The only information Im using is from the original table

:

Do you get the prompt for Project_ID if you run the query by itself
(i.e.:
not opening the form for which it's the recordsource?) If not, are
you
attempting to use Project_ID anywhere on the form?

If you get the prompt running the query by itself, is the query
based
on
another query that has a parameter?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I set up a Form to create a report using a Text Box as a form
control.

A Control Button is set up to open the report.

In the criteria selection of the query i have:

[Forms]![frmParam]![txtObject_ID]

Correct me if im wrong but i should just be able to type in the
object
id.
The press the control button and the report will open showing the
information
i selected in the query.

However I get an Enter Parameter box that pops up asking for the
Project_ID.
However I ahve nothing in the query asking for the Project_ID
parameter.
The
query is also just based on one table. Theres no relationships.

Any ideas how to get rid of the Enter Parameter box?
 

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