Multiple Prompts

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I have a query that prompts the user for 5 part numbers
and i just use something like "[pn1] or [pn2]....." to
complete the query. My problem is that I want the user
to be asked how many part numbers they have to query and
then base the report on those values so that they dont
have to run the report multiple times.

Is this possible?

Thanks,

-Steve
 
I see several posts that seem to address similar issues, and I also need
something similar, except I also need to allow for the user not selecting
anything. I'm using a form for selection and pass the value of the field on
to the query criteria (use the Expression builder for it). I would like for
the user to select several values or leave the selection field blank since I
have many other fields for selection. It's a drill down selection form.
Could you possibly point us to a place for some sample code if this needs to
be done in VBA.
Thank you for any help.
Brigitte P.
Ken Snell said:
Not from a query. You'd need to use VBA code to do this.

--

Ken Snell
<MS ACCESS MVP>

Steve said:
I have a query that prompts the user for 5 part numbers
and i just use something like "[pn1] or [pn2]....." to
complete the query. My problem is that I want the user
to be asked how many part numbers they have to query and
then base the report on those values so that they dont
have to run the report multiple times.

Is this possible?

Thanks,

-Steve
 
Not sure what your form's setup is, but here is a link to code for using a
multi-select listbox for getting multiple parameters for a query:

http://www.mvps.org/access/forms/frm0007.htm


--

Ken Snell
<MS ACCESS MVP>

Brigitte P said:
I see several posts that seem to address similar issues, and I also need
something similar, except I also need to allow for the user not selecting
anything. I'm using a form for selection and pass the value of the field on
to the query criteria (use the Expression builder for it). I would like for
the user to select several values or leave the selection field blank since I
have many other fields for selection. It's a drill down selection form.
Could you possibly point us to a place for some sample code if this needs to
be done in VBA.
Thank you for any help.
Brigitte P.
Ken Snell said:
Not from a query. You'd need to use VBA code to do this.

--

Ken Snell
<MS ACCESS MVP>

Steve said:
I have a query that prompts the user for 5 part numbers
and i just use something like "[pn1] or [pn2]....." to
complete the query. My problem is that I want the user
to be asked how many part numbers they have to query and
then base the report on those values so that they dont
have to run the report multiple times.

Is this possible?

Thanks,

-Steve
 
Oh now I got it. I have one of those in another database and can use it as a
sample. Using a multiselect listbox is the answer, my thinking was entirely
wrong. Can't believe I didn't think of this, guess I don't do enough
database development to remember. Thank you so much for your help.
Brigitte P.


Ken Snell said:
Not sure what your form's setup is, but here is a link to code for using a
multi-select listbox for getting multiple parameters for a query:

http://www.mvps.org/access/forms/frm0007.htm


--

Ken Snell
<MS ACCESS MVP>

Brigitte P said:
I see several posts that seem to address similar issues, and I also need
something similar, except I also need to allow for the user not selecting
anything. I'm using a form for selection and pass the value of the field on
to the query criteria (use the Expression builder for it). I would like for
the user to select several values or leave the selection field blank
since
I
have many other fields for selection. It's a drill down selection form.
Could you possibly point us to a place for some sample code if this
needs
to
be done in VBA.
Thank you for any help.
Brigitte P.
Ken Snell said:
Not from a query. You'd need to use VBA code to do this.

--

Ken Snell
<MS ACCESS MVP>

I have a query that prompts the user for 5 part numbers
and i just use something like "[pn1] or [pn2]....." to
complete the query. My problem is that I want the user
to be asked how many part numbers they have to query and
then base the report on those values so that they dont
have to run the report multiple times.

Is this possible?

Thanks,

-Steve
 
Wow, did you see the following site:
http://www.fontstuff.com/access/acctut11.htm
It shows kind of the same code that is given on the mvps site, but it is
explained step by step. There is a lot other neat stuff on that site,
including tutorials for lots of Access thing plus sample code, plus sample
databases, plus, plus.
Thought maybe someone would enjoy digging there.
Brigitte P.
Ken Snell said:
Not sure what your form's setup is, but here is a link to code for using a
multi-select listbox for getting multiple parameters for a query:

http://www.mvps.org/access/forms/frm0007.htm


--

Ken Snell
<MS ACCESS MVP>

Brigitte P said:
I see several posts that seem to address similar issues, and I also need
something similar, except I also need to allow for the user not selecting
anything. I'm using a form for selection and pass the value of the field on
to the query criteria (use the Expression builder for it). I would like for
the user to select several values or leave the selection field blank
since
I
have many other fields for selection. It's a drill down selection form.
Could you possibly point us to a place for some sample code if this
needs
to
be done in VBA.
Thank you for any help.
Brigitte P.
Ken Snell said:
Not from a query. You'd need to use VBA code to do this.

--

Ken Snell
<MS ACCESS MVP>

I have a query that prompts the user for 5 part numbers
and i just use something like "[pn1] or [pn2]....." to
complete the query. My problem is that I want the user
to be asked how many part numbers they have to query and
then base the report on those values so that they dont
have to run the report multiple times.

Is this possible?

Thanks,

-Steve
 
Back
Top