473,394 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Show only Certain Report...Not all of it?

Hello,

I am somewhat familliar with the VB6 way of doing things (AKA haven't the foggiest clue)

I know how to create the DataReport in VB6 and How to Connect the Database....but...how do I make it so I can display only the last record added so I can print that one page and not all the other records in the Database?

And one more question simular in context....

How do I make it so I can also show only a specific range of information...in other words...show only records in the user defigned date range (Date is mm-dd-yyyy)

any help on either questions, that would be great,
Thank you in advance,
Aug 15 '06 #1
1 1410
sashi
1,754 Expert 1GB
Hi there,

well.. kind of simple.. just follow the steps below.. good luck my fren..

1st..
create your table with a field named [id] or something like that, set the datatype to autonumber.. this will provide you sequential number.. rite??

2nd..
issue an SQL statement with [MAX] keyword by means to select maximum value from a specific field..

syntax..
Expand|Select|Wrap|Line Numbers
  1. SELECT MAX(expression ) FROM tables WHERE predicates;
  2.  
sample usage..
Expand|Select|Wrap|Line Numbers
  1. SELECT MAX(ID) FROM tblName;
  2.  
to select data in a defined range simple follow the step below..

syntax..
Expand|Select|Wrap|Line Numbers
  1. SELECT column_name FROM table_name WHERE column_name BETWEEN value1 AND value2
  2.  
sample usage..
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM tblName WHERE 'search_criteria' BETWEEN 'date1' AND 'date2'
  2.  
pls refer to the below attached link for further reading.. take care..

http://www.w3schools.com/sql/
Aug 17 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Sam | last post by:
Hello everyone, I have a table, which contains a picture column, I put URL info into it. "www.myweb.com/1.jpg..." I want to show this picture in my crystal report, I find some samples show the...
1
by: Roger | last post by:
I couldn't find anything at http://www.mvps.org/access/reports/index.html I have a report with static (name, address, etc) in its report header and a subreport in the report's detail section ...
2
by: a_munch | last post by:
Hello, I was wondering if there's any way to create a report that will show only rows from a query that meet certain criteria? I can't create a second query that will pull only the records I need...
7
by: Anne M | last post by:
I have a report based on query..which is a team list with names and their role on team ie coach, assistant and player. Report is almost what I want and my knowledge is limited so I need some...
2
by: Henry | last post by:
I am trying to write an application that allows me to dynamically load selected Crystal Report files, read the parameters from the report file, give the user a chance to enter relevant data in a...
2
by: Dean Slindee | last post by:
Anybody written code in VB.NET to: 1) show a print preview window of reports already written and stored in an Access 2002 database; or 2) execute the print of a report stored in an Access 2002...
0
by: Mariana | last post by:
Hello, I am exporting reports in pdf format from .net 2005 . The export is working fine; however the user values of stored procedure parameters does not show in the report. What do I need to do in...
2
by: NicholasSerpentine | last post by:
Hi folks....I have been checking out this group and have found help and solutions to everything I have needed up to this point. I have created a report based on a Query to show me certain activity...
4
by: scubasteve | last post by:
Hi, I'm having issues with AC2007 custom ribbons. I'm building an AC2007 runtime app which has a custom ribbon (called CommandsDisabledHideRibbon) set as the default db ribbon name (see XML at...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.