A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculate post and show number for every post



 
 
Thread Tools Display Modes
  #1  
Old March 18th, 2010, 12:18 AM posted to microsoft.public.access.forms
Highlight between 3 fields[_2_]
external usenet poster
 
Posts: 26
Default Calculate post and show number for every post

Hello

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 is on this post list and show
with every post a number.
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.

Where the wrong on this is code or is there better idea to get the counter
on form on MS Access 2007?

Thanks a lot

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:51 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.