A
Alp Bekisoglu
Hi Experts,
Got stuc again! I'm trying to display the results of a VBA for/next loop in
a form as parsed into fields (textboxes).
I do get everything I want and display it in a MsgBox. Also the same with
Debug.Print. I couldn't figure out/remember how to parse this into a form
designed as a continuous form.
All I get for the time is the very last output of the loop. Just need to be
able to get the previous ones displayed as individual lines on the form.
The form has 5 textboxex in which I would like to display the values for
x | Date | Description | Amount | Balance
Code is:
Dim aylik As Single, Toplam As Single, bakiye As Single
Dim adet As Long, gun As Date
Dim izah As String
bakiye = Me.tpybl
adet = Me.inst_no
aylik = Me.inst_amount
gun = date
For x = 1 To adet
If Len(x) = 1 Then
A = " " & x
Else
A = x
End If
izah = A & ". installment"
bakiye = bakiye - aylik
ara = Day(gun)
ara1 = Month(gun) + x
ara3 = year(gun)
Me.tarih = DateSerial(ara3, ara1, ara)
Me.aciklama = izah
Me.odeme = aylik
Me.Kalan = bakiye
Debug.Print izah & " "; aylik & " "; bakiye
g = "|" & Me.tarih & "|" & izah & "|" & aylik & "|" & bakiye &
vbCrLf
ResTxt = ResTxt & g
Next x
head = "|" & "__Date__" & "|" & "Description " & "|" & "Amount" & "|" &
"Balance" & vbCrLf
MsgBox head & ResTxt, vbOKOnly, "Calculation Results"
Thanks in advance,
Alp
Got stuc again! I'm trying to display the results of a VBA for/next loop in
a form as parsed into fields (textboxes).
I do get everything I want and display it in a MsgBox. Also the same with
Debug.Print. I couldn't figure out/remember how to parse this into a form
designed as a continuous form.
All I get for the time is the very last output of the loop. Just need to be
able to get the previous ones displayed as individual lines on the form.
The form has 5 textboxex in which I would like to display the values for
x | Date | Description | Amount | Balance
Code is:
Dim aylik As Single, Toplam As Single, bakiye As Single
Dim adet As Long, gun As Date
Dim izah As String
bakiye = Me.tpybl
adet = Me.inst_no
aylik = Me.inst_amount
gun = date
For x = 1 To adet
If Len(x) = 1 Then
A = " " & x
Else
A = x
End If
izah = A & ". installment"
bakiye = bakiye - aylik
ara = Day(gun)
ara1 = Month(gun) + x
ara3 = year(gun)
Me.tarih = DateSerial(ara3, ara1, ara)
Me.aciklama = izah
Me.odeme = aylik
Me.Kalan = bakiye
Debug.Print izah & " "; aylik & " "; bakiye
g = "|" & Me.tarih & "|" & izah & "|" & aylik & "|" & bakiye &
vbCrLf
ResTxt = ResTxt & g
Next x
head = "|" & "__Date__" & "|" & "Description " & "|" & "Amount" & "|" &
"Balance" & vbCrLf
MsgBox head & ResTxt, vbOKOnly, "Calculation Results"
Thanks in advance,
Alp