R
RJB
I posted this in the forms newsgroup and got some ideas, but haven't had any
luck executing them in a way that works. Here's the full description of
what I've got and what I need to do.
I've got a database for a printing company and I'm making the workorders
digital instead of hand written. The workorder itself is a form with a
subform in it. In the main form is a field called "LogID". In the subform
there is a field called "Log Letter" which separates each individual print
run for a particular LogID. Also in the subform is a field for "Order Type"
which has 5 options, but for example we'll just say the options are "Black"
and "Color". Any given LogID may have a mix of Order Types. 1 Black, 1
Color: 1 Black and 2 Color, vice versa...etc, all depending on what a
client is ordering with that particular job. At the bottom of the main form
is 1 button: "Create Workorder". This button opens a report that has all
the important information entered in the form/subform.
What I need to do, is separate the jobs by Order Type. When they click on
"Create Workorder", it should preview the report with one page having only
'Log Letter's that have the "Order Type" of 'Black'. Page 2 then should
have any 'Color' "Order Type"s. And if there are only 'Black' or only
'Color', then that should just preview a single page report.
Here's an example of what I've got on the form and what I need in the
report - I added some other variables the the examples to make things a
little more clear:
___________________________
FORM:
LogID: 3005
client: JohnDoe Sales
*Subform*
Log Letter: A OrderType: Black
Log Letter: B OrderType: Black
Log Letter: C OrderType: Color
_________________________________
REPORT: Black Workorder
LogID: 3005 Page: 1 of 2
JohnDoe Sales
A Black
B Black
_________________________________
REPORT: Color Workorder
LogID: 3005 Page: 2 of 2
JohnDoe Sales
C Color
_____________________________________
Any ideas on how I can make this happen, or is there a easy / better way
that I'm not thinking of? Also, do I need a subreport on the report to make
this work right?
I had this response in another forum:
"You can use the same report and report recordsource for all your options.
Put code behind the buttons that will create a Where criteria string you can
use for the Where argument of the OpenReport method to filter the report's
record source based on the selections."..."place it in the "On Click"
event".
I think the problem, aside from me probably not knowing coding nearly well
enough - is that I already have code in the "On Click" event for that button
(to output only the LogID currently being edited/viewed - from lebans.com).
I am trying to learn, but samples are greatly appreciated. I understand
some of the lingo, but my last programming class was in '98 and I haven't
used it much since.
Thanks in advance,
Rick
(e-mail address removed)
luck executing them in a way that works. Here's the full description of
what I've got and what I need to do.
I've got a database for a printing company and I'm making the workorders
digital instead of hand written. The workorder itself is a form with a
subform in it. In the main form is a field called "LogID". In the subform
there is a field called "Log Letter" which separates each individual print
run for a particular LogID. Also in the subform is a field for "Order Type"
which has 5 options, but for example we'll just say the options are "Black"
and "Color". Any given LogID may have a mix of Order Types. 1 Black, 1
Color: 1 Black and 2 Color, vice versa...etc, all depending on what a
client is ordering with that particular job. At the bottom of the main form
is 1 button: "Create Workorder". This button opens a report that has all
the important information entered in the form/subform.
What I need to do, is separate the jobs by Order Type. When they click on
"Create Workorder", it should preview the report with one page having only
'Log Letter's that have the "Order Type" of 'Black'. Page 2 then should
have any 'Color' "Order Type"s. And if there are only 'Black' or only
'Color', then that should just preview a single page report.
Here's an example of what I've got on the form and what I need in the
report - I added some other variables the the examples to make things a
little more clear:
___________________________
FORM:
LogID: 3005
client: JohnDoe Sales
*Subform*
Log Letter: A OrderType: Black
Log Letter: B OrderType: Black
Log Letter: C OrderType: Color
_________________________________
REPORT: Black Workorder
LogID: 3005 Page: 1 of 2
JohnDoe Sales
A Black
B Black
_________________________________
REPORT: Color Workorder
LogID: 3005 Page: 2 of 2
JohnDoe Sales
C Color
_____________________________________
Any ideas on how I can make this happen, or is there a easy / better way
that I'm not thinking of? Also, do I need a subreport on the report to make
this work right?
I had this response in another forum:
"You can use the same report and report recordsource for all your options.
Put code behind the buttons that will create a Where criteria string you can
use for the Where argument of the OpenReport method to filter the report's
record source based on the selections."..."place it in the "On Click"
event".
I think the problem, aside from me probably not knowing coding nearly well
enough - is that I already have code in the "On Click" event for that button
(to output only the LogID currently being edited/viewed - from lebans.com).
I am trying to learn, but samples are greatly appreciated. I understand
some of the lingo, but my last programming class was in '98 and I haven't
used it much since.
Thanks in advance,
Rick
(e-mail address removed)