Hello this is my code,
Let's say that VALUEAPP_CAT has the following records.
(2, "x 100"),(3,"x200"),(4,"x1")
The output should be 2 x100 + 3 x200 + 4 x1 = 804, instead I get 2 x100 = 3 x200 = 4 x1 = 804
Any ideas what's wrong with my code?
Thank you in advance.
Code:
Me.Label323.Caption = ""
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT * FROM VALUEAPP_CAT")
If Not (rs.EOF And rs.BOF) Then
rs.MoveFirst
Do Until rs.EOF = True
With rs
If .AbsolutePosition = .RecordCount - 1 Then
Me.Label323.Caption = Me.Label323.Caption & " " & rs!VAL & " " & rs!SText & " = "
Else
Me.Label323.Caption = Me.Label323.Caption & " " & rs!VAL & " " & rs!SText & " + "
End If
End With
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
Me.Label323.Caption = Me.Label323.Caption & " " & Forms!frmApplication!Amount
Let's say that VALUEAPP_CAT has the following records.
(2, "x 100"),(3,"x200"),(4,"x1")
The output should be 2 x100 + 3 x200 + 4 x1 = 804, instead I get 2 x100 = 3 x200 = 4 x1 = 804
Any ideas what's wrong with my code?
Thank you in advance.