PC Review


Reply
Thread Tools Rate Thread

Adding items from another query in a form

 
 
Jasper Recto
Guest
Posts: n/a
 
      25th Jul 2008
I have a continuous form (frmProduction) that was created from the query
qryLabor.

I have another query called qryLaborSum that uses the qryLaborCosts to sum
up a few fields so I can get the total cost.

I want to add the qrylaborSum information on the footer of the frmProduction
form without using a subreport.

How would I do that?

Thanks,
Jasper


 
Reply With Quote
 
 
 
 
Graham R Seach
Guest
Posts: n/a
 
      27th Jul 2008
I assume you want only a single value; the sum? If so, then I'd say do it in
code in the form's Current event:

Private Sub Form_Current()
Dim db As Database
Dim rs As DAO.Recordset
Dim strSQL As String

strSQL "SELECT * FROM qryLabourSum WHERE somefield = " & Me!txtsomefield

Set db = CurrentDb
Set rs=db.OpenRecordset(strSQL,dbOpenSnapshot)
Me!txtSum = Nz(rs!SumOfLabourCosts, 0)

rs.Close
Set rs = Nothing
Set db = Nothing
End Sub

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

"Jasper Recto" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have a continuous form (frmProduction) that was created from the query
>qryLabor.
>
> I have another query called qryLaborSum that uses the qryLaborCosts to sum
> up a few fields so I can get the total cost.
>
> I want to add the qrylaborSum information on the footer of the
> frmProduction form without using a subreport.
>
> How would I do that?
>
> Thanks,
> Jasper
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding my own rows to a Union Query without adding another table? PaulSchrum Microsoft Access Queries 3 15th Feb 2011 09:28 PM
Adding items from another query in a form Jasper Recto Microsoft Access 1 27th Jul 2008 10:53 AM
Adding items from another query in a form Jasper Recto Microsoft Access Forms 1 27th Jul 2008 10:53 AM
Delete duplicate items in sent items or how to sort by how many items in conversation view dangmoss Microsoft Outlook Discussion 2 2nd Feb 2006 03:59 AM
Adding Items to ListView through another form Ash Phillips Microsoft VB .NET 18 20th Sep 2004 03:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:58 AM.