count on form list

  • Thread starter Thread starter Highlight between 3 fields
  • Start date Start date
H

Highlight between 3 fields

Hello

Hiw can I make count number to calculate how many post raw it is be on the
form list?
So the resoult sould looks:
No
1
2
3
4
5
6
7
8

Thanks

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...c1e964db50b8&dg=microsoft.public.access.forms
 
Hello

Thank you for your replay, but this code not give counter result that show
1
2
3
4
so on

I use Access 2007
Best regards
 
Hi again

Any one have idea to get count nomber that will work on Access 2007

Thanks
 
Hi again

Any one have idea to get count nomber that will work on Access 2007

Thanks

Please explain the context; what are you counting, where, and what problem are
you having?

YOU can see your computer. We cannot!
 
Thank you for your comment

I have Form with list post and filter for searching by textbox.
The scour for this form is query.
I want make count number to know how many raw are on this post list and show
with every post a number (witout number, I can't know how many raw of post
on the list)
I create a textbox and insert on it this code:

=oppp(IIF(true;1;0))

And create a modul that looks as this:

Option Compare Database
Dim aaa As Integer

Function oppp(sss) As Integer

If sss = 1 Then
aaa = aaa + 1
ElseIf sss = 0 Then
aaa = 0
End If
oppp = aaa

End Function


The problem is number work good then it starts just step increase when I
move the list up & down. Even if I close the form and restart it or update
the form, just larger number.

Is there better idea to get the counter on form on MS Access 2007 ?
So every time I make search by filter, so it show the count number like

1
2
3
4

so on with every search it will looks like it. The number have nothing with
post, just to show how many raw on the list.

Here is example of what I mean that have above code:
http://home.swipnet.se/georgedesign/db6.mdb


Thanks a lot
 
Hello Mr John W.

I found your replay to other people that have near to my question.
I test that you wrote and it work.

Thank you very much.
 
Hi Mr John W.

Your code make a sort by [ID] then it work ok, but I have the sort by [Item]

=DCount("*", "queryname", "[ID] <= " & [ID])

So now it looks the number as:
5
100
14
21
25
50
So on.

Can you please make it to sort by [Item] name?

Thanks a lot
 
Hi Mr John W.

Your code make a sort by [ID] then it work ok, but I have the sort by [Item]

=DCount("*", "queryname", "[ID] <= " & [ID])

So now it looks the number as:
5
100
14
21
25
50
So on.

Can you please make it to sort by [Item] name?

Thanks a lot

I'm sorry, but I have no idea what you're talking about. You didn't ask for a
sort, and I didn't suggest anything to sort.

Please post some more context. The DCount() function counts records. It
doesn't do any sorting and it's not intended to do any sorting! What's the
context?
 
Hello Mr Johan

Thank you for your replay.
I send you a sample to show you that the number is not correct growing, so
how can I make it correct.
And I still have sort by Item as(a, b, c, d .....
And DIDIDI have not sort and contain code Dcount()

Here is a picture to see:
http://home.swipnet.se/georgedesign/count123456.jpg

Here is MS access sample 2007 sd same of picture:
http://home.swipnet.se/georgedesign/autocount.accdb

Thank you very for your time.

I'm sorry, but downloading a database, transferring it from my Internet
machine to my A2007 machine, opening it up, working in its design, and so
on.... is WAY beyond what I am comfortable doing as an unpaid volunteer.

If you would open the Query upon which your form is based in SQL view and copy
and paste the SQL text to a message here, I might be able to help, but
downloading your database and trying to wrestle with a Swedish language
application is unreasonable. Again... I'm sorry.
 
Hello Mr John W.

Here is my orginal work

This is query code:
---------------------

SELECT [Inventory Transactions Extended].Inventory.ID, [Inventory
Transactions Extended].Inventory.Item, Sum([Inventory Transactions
Extended].[Actual Quantity]) AS [Current Stock], [Inventory Transactions
Extended].[Reorder Level], [Target Stock Level]-[Current Stock] AS [Reorder
Amount], [Inventory Transactions Extended].[Target Stock Level], [Inventory
Transactions Extended].Category, [Inventory Transactions Extended].Location,
[Suppliers Extended].[Supplier Name], [Inventory Transactions
Extended].Model, [Inventory Transactions Extended].Pris1, [Inventory
Transactions Extended].Pris2, [Inventory Transactions Extended].Pris3,
[Inventory Transactions Extended].St, [Current Stock]*NZ([St],0) AS SumPris
FROM [Inventory Transactions Extended] LEFT JOIN [Suppliers Extended] ON
[Inventory Transactions Extended].Supplier = [Suppliers Extended].ID
GROUP BY [Inventory Transactions Extended].Inventory.ID, [Inventory
Transactions Extended].Inventory.Item, [Inventory Transactions
Extended].[Reorder Level], [Inventory Transactions Extended].[Target Stock
Level], [Inventory Transactions Extended].Category, [Inventory Transactions
Extended].Location, [Suppliers Extended].[Supplier Name], [Inventory
Transactions Extended].Model, [Inventory Transactions Extended].Pris1,
[Inventory Transactions Extended].Pris2, [Inventory Transactions
Extended].Pris3, [Inventory Transactions Extended].St
ORDER BY [Inventory Transactions Extended].Inventory.Item;

-------------
Here is picture design of Query:
http://home.swipnet.se/georgedesign/querydesign.jpg

Here is picture Form that is final work on it:
http://home.swipnet.se/georgedesign/form.jpg

I did try to make it so easy for understanding what I am looking about.

Thank you very much for your time.
 
Back
Top