Solved

create 2 reports from table1

Posted on 2014-04-08
2
168 Views
Last Modified: 2014-04-08
Hello,
attached database example:
Need to create 2 reports from TABLE 1.
In the table you will see numbers like 099-885-173 and other numbers with no dashes and different number of digits.
1 report needs to only include records with numbers in the ScanNumber field like 099-885-173 ( with dashes)
2nd report needs to only include the numbers without dashes
( note: the numbers with dashes will always have same number of digits and will be formatted same)

thank you
test-a-database.accdb
0
Comment
Question by:davetough
2 Comments
 
LVL 27

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 39987133
Use this sql for the record source of report 1:
SELECT TABLE1.[Building#], TABLE1.[Tracking#], TABLE1.ScanNumber, TABLE1.SDate
FROM TABLE1
WHERE ((InStr([TABLE1].[ScanNumber],"-")>"0"));

Open in new window

And this sql  for the record source of report 2:
SELECT TABLE1.[Building#], TABLE1.[Tracking#], TABLE1.ScanNumber, TABLE1.SDate
FROM TABLE1
WHERE ((InStr([TABLE1].[ScanNumber],"-")="0"));

Open in new window

0
 

Author Closing Comment

by:davetough
ID: 39987727
thanks for your help!
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question