B
Bonnie A
Hi everyone!!! Hope your holiday season is going smoothly. I'm using A02 on
XP.
I have a query that pulls the data I want from my table. I have a report
with the fields on it. I have a form with no record source and the following
fields:
[BeginDate] and [EndDate] date fields - These should pull All [TDATE] from
[BeginDate] to [EndDate]. If the fields are blank, ignore and move to next
criteria;
[PolicyNumber] text field with input mask '000000' - First I need to 'pad'
the letter 'E' to the front of [PolicyNumber]. Then this should pull All
[POLICY] that equal "E"&[PolicyNumber];
[ReasonCode] List Box with a query as it's row source. Multiselect is set
to simple. - One or more may be selected or none.
Finally, [CSR] List Box with a query as row source. Multiselect set to
simple. - One or more may be selected or none.
If I only put in a start and end date, I want all records from to the dates.
If I have a start and end date and 2 reason codes, I want all records that
meet the date and reason code criteria.
I've seen this done somewhere but don't know where to start.
My query SQL is: SELECT BackDateTable.TDATE, BackDateTable.POLICY,
BackDateTable.PLAN, BackDateTable.EDATE, BackDateTable.TCODE,
BackDateTable.REVCODE, BackDateTable.RCODE, BackDateTable.CSR,
BackDateTable.TOTALS, BackDateTable.REASON, BackDateTable.COMMENTS,
BackDateTable.SUBMIT, BackDateTable.DATESUBMITTED, BackDateTable.APPROVED,
BackDateTable.REVIEWEDBY, BackDateTable.DATEREVIEWED,
BackDateTable.MGMTCOMMENTS
FROM BackDateTable
WITH OWNERACCESS OPTION;
Do I do something here in the query with WHERE or do I put something in the
code that opens the report?
I really think this will be the best way to go so one query and one report
with one form can pull a variety of data. Can someone help?
Thanks in advance for your time and advice.
XP.
I have a query that pulls the data I want from my table. I have a report
with the fields on it. I have a form with no record source and the following
fields:
[BeginDate] and [EndDate] date fields - These should pull All [TDATE] from
[BeginDate] to [EndDate]. If the fields are blank, ignore and move to next
criteria;
[PolicyNumber] text field with input mask '000000' - First I need to 'pad'
the letter 'E' to the front of [PolicyNumber]. Then this should pull All
[POLICY] that equal "E"&[PolicyNumber];
[ReasonCode] List Box with a query as it's row source. Multiselect is set
to simple. - One or more may be selected or none.
Finally, [CSR] List Box with a query as row source. Multiselect set to
simple. - One or more may be selected or none.
If I only put in a start and end date, I want all records from to the dates.
If I have a start and end date and 2 reason codes, I want all records that
meet the date and reason code criteria.
I've seen this done somewhere but don't know where to start.
My query SQL is: SELECT BackDateTable.TDATE, BackDateTable.POLICY,
BackDateTable.PLAN, BackDateTable.EDATE, BackDateTable.TCODE,
BackDateTable.REVCODE, BackDateTable.RCODE, BackDateTable.CSR,
BackDateTable.TOTALS, BackDateTable.REASON, BackDateTable.COMMENTS,
BackDateTable.SUBMIT, BackDateTable.DATESUBMITTED, BackDateTable.APPROVED,
BackDateTable.REVIEWEDBY, BackDateTable.DATEREVIEWED,
BackDateTable.MGMTCOMMENTS
FROM BackDateTable
WITH OWNERACCESS OPTION;
Do I do something here in the query with WHERE or do I put something in the
code that opens the report?
I really think this will be the best way to go so one query and one report
with one form can pull a variety of data. Can someone help?
Thanks in advance for your time and advice.