Solved

create 2 reports from table1

Posted on 2014-04-08
2
170 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

733 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