select certain records for a report?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

good day all,

I have a report (rptlabels) that I use for new inventory items. I would
like to be able to choose 1 or many serial numbers (field value: serialnum)
for the report to print? How would I do this? Would I have to create a new
form?

Thanks,

Brook
 
Brook said:
I have a report (rptlabels) that I use for new inventory items. I would
like to be able to choose 1 or many serial numbers (field value: serialnum)
for the report to print? How would I do this? Would I have to create a new
form?


A form is a good way to control a report. The form would
have some mechanism to select/enter the desired serial
numbers and a button to initiate the report.

The report's record source table or query would not be
concerned with serial numbers since the code behind the
button would construct the OpenReport method's
WhereCondition argument to filter the report.

For example, if you have a text box where you can enter a
comma delimited list of serial numbers, then the code for
the button would look like:

Dim stDoc As String
Dim stWhere As String
stDoc = "name of report"
stWhere = "SerialNum IN(" & thetextbox & ")"
DoCmdOpenReport stDoc, , , stWhere
 
marshall,

Thanks for the post..

could I set up the form to look up the serialnum from my tblinventory?

Brook
 
You can use a multi-select list box instead of a text box
with different code to construct the string for the IN
operator.

Is that the kind of thing you are looking for?
 
Marshall,

maybe this will help... i'm not sure if your suggestion would work with
what i'm trying to accomplish...

I have a tblinventory and the following relevant fields:

serialnum (I.E. NW-0001, NW-0002 and so on...)
size
colours
Quality

When the orders arrive from my overseas manufacturer, I print labels for
the itms arrived by shipment.

So I would like the user to be able to choose inventory items as they
arrive b/c its not always sequential..

So the user would have the option to choose:

NW-0001
NW-0004
NW-0031

and so on...

does this help?

Brook

Marshall Barton said:
You can use a multi-select list box instead of a text box
with different code to construct the string for the IN
operator.

Is that the kind of thing you are looking for?
--
Marsh
MVP [MS Access]

could I set up the form to look up the serialnum from my tblinventory?
 
Brook said:
maybe this will help... i'm not sure if your suggestion would work with
what i'm trying to accomplish...

I have a tblinventory and the following relevant fields:

serialnum (I.E. NW-0001, NW-0002 and so on...)
size
colours
Quality

When the orders arrive from my overseas manufacturer, I print labels for
the itms arrived by shipment.

So I would like the user to be able to choose inventory items as they
arrive b/c its not always sequential..

So the user would have the option to choose:

NW-0001
NW-0004
NW-0031


I suggested a multi-select list box because it would allow
you to pick several items from the serial numbers in
tblinventory. Isn't that what you're describing?

How do you want this thing to be used? I was envisioning a
list box so users could pick one or more serial numbers
along with the button to run the report.
 
Your correct, that is exactly what I was wanting to do...

So I need to set up a small form with a multi-select list box? then a
commmand button?

Can you help me further with this?

Brook
 
Back
Top