mubi_masti
Registered User.
- Local time
- Today, 09:04
- Joined
- Oct 2, 2011
- Messages
- 46
I am using following function to get increment values
THe input value is the colume of a query. if sr is divisible by 2 then increase otherwise old value of increment variable
Sr Output required
1 10
2 10
3 11
4 11
5 12
Function IncrementValues(i, Optional myBase As Long) As Integer
Dim IncrementVariable As Long
Dim rs As dao.Recordset
Set rs = CurrentDb.OpenRecordset("queryName")
With rs
IncrementVariable = 0
Do Until .EOF
IncrementVariable = IncrementVariable + 1
IncrementValues = IncrementVariable
.MoveNext
Loop
End With
End Function
THe input value is the colume of a query. if sr is divisible by 2 then increase otherwise old value of increment variable
Sr Output required
1 10
2 10
3 11
4 11
5 12
Function IncrementValues(i, Optional myBase As Long) As Integer
Dim IncrementVariable As Long
Dim rs As dao.Recordset
Set rs = CurrentDb.OpenRecordset("queryName")
With rs
IncrementVariable = 0
Do Until .EOF
IncrementVariable = IncrementVariable + 1
IncrementValues = IncrementVariable
.MoveNext
Loop
End With
End Function