Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

Friday, March 30, 2012

RunningValue question

I have a form that uses some header information (like client ID with name, address, etc) and then uses a table for orders that customer has placed. I now need to print something like a page number (but not in the header or footer). When I try RowNumber, this does not work as the dataset is returning multiple records for the first customer and then the next item in the list (the next customer ID) skips the number of records from the first. So I need the first one to have 1, the second to have 2 and so on. I tries RunningValue, but for each record it starts back at 1. What I need is like a counter.

How would I go about this and thanks for the help.

guy,

what was the scope of your runningvalue expression?

Ham

|||I was using the dataset itself and then I tried the table that holds the orders.|||

Try

RunningValue(MyFieldsCount.value,Count,Nothing)

Is will eliminated the scope and you should then get continously counting rows.

Ham

|||Using this I get an error message about aggregate functions only being allowed to use report items contained in the page header or page footer.|||

Guy,

I thought that you were not trying to place this in the header or footer and that you wanted a way to have a continues count of your rows, maybe I'm missing something, are you trying to get a page count, row count, and some of count?

Ham

|||should read "some other count"

Friday, March 23, 2012

Running total

Help can anyone see anything wrong with this I am trying to get a running total to show on my form for the users to see, as a team member makes a payment they should be able to see the remaining amount

SELECT SUM(DISTINCT TotalPayments) AS Payment, SUM(AmountDue) AS Due, SUM(FinePayment) AS Fine, [TM #]
FROM dbo.FinePayments_Tbl
GROUP BY [TM #]
HAVING ([TM #] = 9282)Running totals are best handled by your reporting application, but if absolutely necessary you can create them using a nested subquery.

What are you using to display your output?|||I just went on ahead and created a report instead since I am having difficulty with the form

SELECT SUM(DISTINCT dbo.FinePayments_Tbl.TotalPayments) AS Payment, SUM(dbo.FinePayments_Tbl.AmountDue) AS Due,
SUM(dbo.FinePayments_Tbl.FinePayment) AS Fines, dbo.FinePayments_Tbl.FineAmount AS Amount, dbo.FinePayments_Tbl.[TM #],
dbo.Employee_Fines.[FIRST NAME], dbo.Employee_Fines.[LAST NAME]
FROM dbo.FinePayments_Tbl INNER JOIN
dbo.Employee_Fines ON dbo.FinePayments_Tbl.[TM #] = dbo.Employee_Fines.[TM #]
GROUP BY dbo.FinePayments_Tbl.[TM #], dbo.FinePayments_Tbl.FineAmount, dbo.Employee_Fines.[FIRST NAME], dbo.Employee_Fines.[LAST NAME]

Tuesday, February 21, 2012

Running SP from Access 2000 with using SP owner qualifier

Hi there,

Can anyone tell me how to call a SQL Server Stored Procedure from an MS Access form with having to use the owner.spname style. I just want to call spname from my form.

I know it has to do with user permissions and roles, but no matter what I do I have to still use the owner.spname style.

Thanks,
Brian.are you using ADP?

if you're not, move it to ADP-- it is an awesome platform.

(ADP handles SP a lot better than MDB)|||Thanks for the suggestion Aaron, but I am using ADP and it's Access 2000.

I think the issue is on the server side with SQL Server, but one of the lads working (same privileges apparently) with me doesn't have this issue ... it's weird and greatly annoying.

Cheers ...|||instead of dealing with buggy input parameters i usually just use this syntax in the recordsource property of an ADP form or report:

EXEC sp_colums 'sysobjects'

is that what you're looking for?|||That works a treat Aaron, thanks a mill. Now life is just so much easier :)