473,737 Members | 9,544 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 1650
58 New Member

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

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

What is your database?

Feb 23 '07 #2
58 New Member

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.

Feb 23 '07 #3

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

Similar topics

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?
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 -----------------------
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 let me. I would just like to type in an ID or the name of the Document and have Access PULL that...
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 back a Run-Time Error 2501 The OpenForm was canceled. Can someone see something I don't here?
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?
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 MsgBox "Please enter a value!", vbOKOnly, "Invalid Search Criterion!"
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 master table based on the Empid mentioned on the form. Please help me how to do this task. Thanks in...
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
by: gondwe | last post by:
What are the coding 4 the following in VB.net: Search command Delete Command Login Window
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 usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.