473,387 Members | 1,528 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,387 software developers and data experts.

how to search data?

9
i have a problem to search my data.i need to used the search data and do some calculation on it. its about the futsal court rent.i wanna calculate the income of that rent.but i dont know how to search the payment for the rent and calculate it. if i search from todays date by the end of this month,then i wanna calculate all the payments records..how am i gonna do this..i really dont know..i hope that theres someone who willing to help me.thank you.
Sep 8 '07 #1
9 1266
debasisdas
8,127 Expert 4TB
You can easily implement all that logic at the backend by writing some procedure or function and calling that from VB.
Sep 8 '07 #2
taepy
9
would u give me some example?
Sep 8 '07 #3
hariharanmca
1,977 1GB
would u give me some example?
Okay,
Explain detail about your problem and front-end and back-end versions.
Better you explain your problem with some example
Sep 8 '07 #4
taepy
9
all the payment made to the manager for the court rent will be recorded in rent.mdb
then there will be a form that will allow the manager to calculate all the payment made by calculating all the data in rent.mdb.the manager will search the data based on the date.
Sep 8 '07 #5
hariharanmca
1,977 1GB
all the payment made to the manager for the court rent will be recorded in rent.mdb
then there will be a form that will allow the manager to calculate all the payment made by calculating all the data in rent.mdb.the manager will search the data based on the date.
Again you are doing the same thing.
  • What calculation you want to do?
  • What is your Database Version?

To search data by Date,
Expand|Select|Wrap|Line Numbers
  1. dim strSql as String
  2. strsql="Select * from tblName where dateField = #" & format(dtDatevalue,"MM/dd/yyyy") & "#"
Sep 8 '07 #6
taepy
9
im really sorry..im a beginner in vb actually..

i wanna calculate the payment(in currency)

example:
date payment
8/9/07 80
8/9/07 70
: :
: :
30/9/07 70

by the end of the month,the system will be able to calculate all the payment.(sum up)

the manager can search the sum by referring on the date.


im using microsoft access 2003
Sep 8 '07 #7
hariharanmca
1,977 1GB
im really sorry..im a beginner in vb actually..

i wanna calculate the payment(in currency)

example:
date payment
8/9/07 80
8/9/07 70
: :
: :
30/9/07 70

by the end of the month,the system will be able to calculate all the payment.(sum up)

the manager can search the sum by referring on the date.


im using microsoft access 2003


For Day :
Expand|Select|Wrap|Line Numbers
  1. dim strSql as String
  2. strsql="Select dateField, Sum(AmountField) As DayTotal from tblName where dateField = #" & format(dtDatevalue,"MM/dd/yyyy") & "# group by dateField"
For Month
Expand|Select|Wrap|Line Numbers
  1. dim strSql as String
  2. strsql="Select Sum(AmountField) As MonthTotal from tblName where Month(dateField) = " & Month(dtDatevalue) & " and Year(dateField) = " & Year(dtDatevalue) & " group by Year(dateField), Month(dateField)"
Sep 8 '07 #8
QVeen72
1,445 Expert 1GB
Hi,

For monthwise Group, u can use this query also:

Expand|Select|Wrap|Line Numbers
  1. dim sSQL as String
  2. sSQL ="Select Format(DateField,'mm-yyyy'), Sum(AmtField) As MonTotal from MyabName Group By Format(DateField,'mm-yyyy')"
  3.  
REgards
Veena
Sep 8 '07 #9
taepy
9
thanks 4 all the replies..i really appreciate it..
Sep 8 '07 #10

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

Similar topics

10
by: Anand Pillai | last post by:
To search a word in a group of words, say a paragraph or a web page, would a string search or a regexp search be faster? The string search would of course be, if str.find(substr) != -1:...
2
by: Lance Hoffmeyer | last post by:
Hi all, Anyone know where I can find a python script to search ebay? I have been looking around but haven't found anything. I know there must be one somewhere so I am probably just looking in...
4
by: Jan | last post by:
I am having problems trying to print a report based on a form. This is a search form only, no data input. There is a query that the form looks at, but then there are numerous comboxes that you...
8
by: Steph | last post by:
Hi. I'm very new to MS Access and have been presented with an Access database of contacts by my employer. I am trying to redesign the main form of the database so that a button entitled...
28
by: joshc | last post by:
If I have an array of data that I know to be sorted in increasing order, and the array is less than 50 elements, and I want to find the first element greater than a certain value, is a simple...
3
by: Sheau Wei | last post by:
This is the search engine code that i create, but it was error and didnt come out the result. Cn u help me to check what wrong with my code? Thanks <Table cellspacing=1 cellPadding=1...
1
by: Harry Haller | last post by:
What is the fastest way to search a client-side database? I have about 60-65 kb of data downloaded to the client which is present in 3 dynamically created list boxes. The boxes are filled from 3...
4
by: BenCoo | last post by:
Hello, In a Binary Search Tree I get the error : Object must be of type String if I run the form only with the "Dim bstLidnummer As New BinarySearchTree" it works fine. Thanks for any...
0
by: | last post by:
I have a question about spawning and displaying subordinate list controls within a list control. I'm also interested in feedback about the design of my search application. Lots of code is at the...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
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,...
0
jinu1996
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...

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.