User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 426,883 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,359 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 387 | Replies: 3
Reply
Join Date: Jun 2007
Location: india /bangalore
Posts: 18
Reputation: ITech is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ITech's Avatar
ITech ITech is offline Offline
Newbie Poster

query to select a range of transactions from mutiple tables respect to date??

  #1  
Apr 8th, 2008
hello ..this problem i am posting 3rd time still not resolved

i aam trying to develop a project using vb and access

i have got a problem

i have 3 tables in access

1.Cust info table(fields are listed below)
cust id,name,age,sex,country...etcxc(primary key cust id)

2,indate(fields are listed below)
custid ,packageid,date,intime,outime(no primary key)

3.package info table(fields are listed below
package id, package name,duration ,price(primary key packageid)


tthese three tables are connected...the attachment shows how it is connected

i want to write a query to select custid, custname,packageid,packagename,duration,price,date,timein,timeout from these tables in vb..n in a data grid to display these.



this has been solved by the following query

Select CI.name,I.ServiceID,P.packagename,P.duration,P.price,I.date,I.timeIn,I.timeOut
From CustInfo CI, InDate I, PakInfo P Where CI.CustID = I.CustID And I.ServiceID = P.ServiceID Order By CI.Name

now the problem is

i want to put two dtpicker one for from date and the other todate..when the user slects a range from the dtpicker fromdtpiker and todtpicker the records in the data grid shud be within that range(i e only those transactions shud be seen).can anyone tell me how to do that,,and one more thing there is a textbox to display the total. in that label it shud sum up all the price column listed in side the datagrid respect to the month selected by the user

can any one help me with this[/quote]
any
Attached Images
File Type: bmp relationship.bmp (445.7 KB, 1 views)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Location: � Jogja �
Posts: 2,585
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Rep Power: 11
Solved Threads: 235
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: query to select a range of transactions from mutiple tables respect to date??

  #2  
Apr 8th, 2008
don't post thread like this again...
use your previous thread, don't make this forum full with your multiple thread. you just ask again in same post.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote  
Join Date: Jun 2007
Posts: 78
Reputation: manoshailu is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 6
manoshailu's Avatar
manoshailu manoshailu is offline Offline
Junior Poster in Training

Re: query to select a range of transactions from mutiple tables respect to date??

  #3  
Apr 9th, 2008
hi,

Try to avoid Posting the same.

Try Below query:

Select CI.name,I.ServiceID,P.packagename,P.duration,sum(p.price),P.price,I.date,I.timeIn,I.timeOut
From CustInfo CI, InDate I, PakInfo P Where CI.CustID = I.CustID And I.ServiceID = P.ServiceID and indate.intime>='" & dtpicker1.text & "' and indate.outime<='" & dtpicker2.text & "'
group by CI.name,I.ServiceID,P.packagename,P.duration,P.price,I.date,I.timeIn,I.timeOut
Order By CI.Name

Have a nice day.

Shailaja


Originally Posted by ITech View Post
hello ..this problem i am posting 3rd time still not resolved

i aam trying to develop a project using vb and access

i have got a problem

i have 3 tables in access

1.Cust info table(fields are listed below)
cust id,name,age,sex,country...etcxc(primary key cust id)

2,indate(fields are listed below)
custid ,packageid,date,intime,outime(no primary key)

3.package info table(fields are listed below
package id, package name,duration ,price(primary key packageid)


tthese three tables are connected...the attachment shows how it is connected

i want to write a query to select custid, custname,packageid,packagename,duration,price,date,timein,timeout from these tables in vb..n in a data grid to display these.



this has been solved by the following query

Select CI.name,I.ServiceID,P.packagename,P.duration,P.price,I.date,I.timeIn,I.timeOut
From CustInfo CI, InDate I, PakInfo P Where CI.CustID = I.CustID And I.ServiceID = P.ServiceID Order By CI.Name

now the problem is

i want to put two dtpicker one for from date and the other todate..when the user slects a range from the dtpicker fromdtpiker and todtpicker the records in the data grid shud be within that range(i e only those transactions shud be seen).can anyone tell me how to do that,,and one more thing there is a textbox to display the total. in that label it shud sum up all the price column listed in side the datagrid respect to the month selected by the user

can any one help me with this
any[/quote]
Reply With Quote  
Join Date: Jul 2007
Location: Philippines
Posts: 205
Reputation: jireh is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 22
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz in Training

Re: query to select a range of transactions from mutiple tables respect to date??

  #4  
Apr 9th, 2008
Dont you know your molesting everyone here?! the way you post your thread makes us ...... !!!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 10:37 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC