C
caimito
I have a module for a report that uses DAO to obtain
labels and data fields from the report's underlying query.
My query has a parameter that prompts the user for data.
In order to resolve a "Too few parameters. Expected XX"
error, I found MS Knowledge Base Articles 209203 and
210244. But althouth these articles discuss passing a
prompt as a parameter for a query in code, the example
given does not actually prompt the user. The following
code line is from the article:
kb 209203
qdfSample![Please enter date:] = #8/8/94#
kb 210244
Mydef![Enter a City] = "Seattle"
Both of these lines actually set the value and do not
prompt for the data. I have tried variations of this
using the code below and also an inputbox. The code below
gives an error because the query parameter does not prompt
therby not returning valid fields used in my code:
qdf![Enter the Budget Activity: 54 or 55] = [Enter the
Budget Activity: 54 or 55]
The inputbox caused a prompt to occur twice for the same
parameter data. If the data is not entered exactly the
same the report is erroneous. I know the remainder of my
code works because if I actually put "54" or "55" to the
right of the equal sign the code will use that string for
the parameter and give me the correct report, just like in
the kb articles. The query itself still performs the
separate prompt that appears in its criteria. How do I
get only one prompt that will work in my code and in the
query?
labels and data fields from the report's underlying query.
My query has a parameter that prompts the user for data.
In order to resolve a "Too few parameters. Expected XX"
error, I found MS Knowledge Base Articles 209203 and
210244. But althouth these articles discuss passing a
prompt as a parameter for a query in code, the example
given does not actually prompt the user. The following
code line is from the article:
kb 209203
qdfSample![Please enter date:] = #8/8/94#
kb 210244
Mydef![Enter a City] = "Seattle"
Both of these lines actually set the value and do not
prompt for the data. I have tried variations of this
using the code below and also an inputbox. The code below
gives an error because the query parameter does not prompt
therby not returning valid fields used in my code:
qdf![Enter the Budget Activity: 54 or 55] = [Enter the
Budget Activity: 54 or 55]
The inputbox caused a prompt to occur twice for the same
parameter data. If the data is not entered exactly the
same the report is erroneous. I know the remainder of my
code works because if I actually put "54" or "55" to the
right of the equal sign the code will use that string for
the parameter and give me the correct report, just like in
the kb articles. The query itself still performs the
separate prompt that appears in its criteria. How do I
get only one prompt that will work in my code and in the
query?