I will place this question both in the Forms and the Table Forum because I am not sure where should it be.
I am trying to do a payment calendar, sort of a What if scenario.
My form has 3 fields. Customer ID, Amount to pay and Number of payments.
Based on this information I have to create a bunch of fields, each one which is a payment date and amount.
The Form has to be unbound at the beginning. After I capture the data, I calculate the payments programatically, which I can.
I also opened a recordset that has the data.
What I am missing is how to connect these data back to the form.
This is my code
Set cnn1 = New ADODB.Connection
With cnn1
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = CurrentProject.Path & "\credito_App.mdb"
.Open
End With
Set rsCust = New ADODB.Recordset
rsCust.CursorType = adOpenKeyset
rsCust.LockType = adLockOptimistic
rsCust.Open "Calendar", cnn1
With rsClientes
' With frm1
.AddNew
' Save Data to DB
.Fields("IDnumber").Value = Me.FindCust
.Fields("Payments").Value = Me.Payments
.Fields("Total").Value = Me.Total
m = Me.Payments
For j = 1 To m
nextrec = recname + Trim(Str(j))
MsgBox ("I will save" + " " + nextrec)
.Fields(nextrec).Value = Amount
Next j
.Requery
End With
When I look into the Database the new record is not there and I don't know how to connect this new record to the Form since the Form is unbound. DO i Need to have two identical Forms one bound and the other unbound and here switch to the other form?
I will greatly appreciate the input.