473,573 Members | 3,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use a search command in datareport

17 New Member
I am using VB6.0 and want to add a search command before generating the report just like we do in crystal reports.plz tell me how to do it in VB6.0,i dont have crystal report
Feb 21 '07 #1
2 1645
Esmael
58 New Member
HI....


I'ved done that...
in coding....

Its ok to PM me... then i'll on this forum....

What is your database?





GoodLuck
Feb 23 '07 #2
Esmael
58 New Member
Hi...

This code assumes that you know Data Report and Data Environment and SQL also.

Here is the sample code:

DE_DTR-name of Data Environment
SqlTran_PDay-name of SQL declared on DE_DTR
dtPic.Value -Date Picker

This is a snippets from my DTR System it displays data based from the given date.(dtPic.Val ue ).

NOTE:This will re-written your SQL on SqlTran_PDay in DE_DTR

Private Sub CmdDaily_Click( )
If DE_DTR.Recordse ts("SqlTran_PDa y").State = adStateOpen Then DE_DTR.Recordse ts("SqlTran_PDa y").Close
DE_DTR.Commands ("SqlTran_PDay" ).CommandText = _
"SELECT t.TransacID,t.E mpID, " & _
"t.TimeIN,t.Tim eOut," & _
"t.Tran_Date,t. Remarks, " & _
"e.EmpID,e.Last _Name,e.First_N ame,e.Middle,e. BCodeID " & _
"FROM TBL_Tran_DTR t " & _
"INNER JOIN TBL_EmployeeMas ter e ON " & _
"t.EmpID = e.EmpID " & _
"WHERE t.Tran_Date =#" & dtPic.Value & "#"

DtaDaily.Show 'Displays the DataReport

End Sub


I wish i could help you better by emailing some sample program for this...

If you still have questions or any further question for this matter...
Feel free to asked.

Friend...
GoodLuck
Feb 23 '07 #3

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

Similar topics

2
3591
by: Sean Dodsworth | last post by:
Can anyone tell me how to get a message's number from the message-id using IMAP4.search? I've tried this: resp, items = server.search(None, 'HEADER', '"Message-id"', msgID) but it gives me a 'bogus search criteria' error Any ideas?
3
2857
by: Yemi Alade via .NET 247 | last post by:
(Type your message here) How do you write the code in vb.net to perform a search in a database? Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSearch.Click End Sub End Class -------------------------------- From: Yemi Alade -----------------------
1
1271
by: TheDataGuy | last post by:
Using MS ACCESS 2002 Problem - I developed a form, and within that FORM, I added a SEARCH BUTTON, and then I created a SUB-FORM, so when an end user clicks on the FORM it will POP-UP the SUB-FORM, and in that SUB-FORM I added all the FIELDS I want to view. However, when I try to type in data into the FIELDS I am searching for, it does not...
1
1932
by: Haole88 | last post by:
I am brand new to VBA - so if this is a brain-donor question...sorry!! I have a search button on my switchboard with two fields next to it - Status and Technician. I can search for both fields and it brings up my form. I can search for just Status and it brings up my form. But if I attempt to search by just Technician (stEmpID) it brings...
1
1871
by: hstiwana | last post by:
i have data in access (mdb) for word meaning (dictionary) software from english to punjabi. i want to add search command in the program that the program is picking words from the databas as per typing in textbox. I can be solved by call query data, but i failed to feed this code. Can anybody help me?
4
2218
by: pelicanstuff | last post by:
I found some code for text-searching in forms (using an unbound text box and a command button), and adapted it to look like this: Private Sub Command83_Click() Dim strPersonRef As String Dim strSearch As String 'Check txtSearch for Null value or Nill Entry first. If IsNull(Me!) Or (Me!) = "" Or (Me!) = "Surname" Then ...
1
1715
by: praveenkanaka | last post by:
Hi, I'm working on database to store n retrive data from the master table(13 feilds , EmpId feild is the primary key). I have 2 forms. Main form is used to enter the date into table. The second form i used to pull the data from the master table nad display the same in 2nd form. I want to create a search button, which should pull data from...
3
1824
by: wassimdaccache | last post by:
Dear I am working on office 2007. I was working on office 2003 I had a combo in the toolbar on access where I can find the control name of my record. For example if I have in a form many command name as below: Command1
1
2244
by: gondwe | last post by:
What are the coding 4 the following in VB.net: Search command Delete Command Login Window
0
7733
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7640
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7957
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8000
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6337
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5524
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3685
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2138
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.