First, go through ALL of your code and delete every ".Text". That is the wrong property to use. The property you want is ".Value", but since that property is the default, you don't need to type it.
EVERY code module should have these two lines at the top:
Code:
Option Compare Database
Option Explicit
To refer to a form, this is incorrect
Code:
[Form_REDEMPTION INPUT].frmPartialPay.Requery
The correct syntax is
Code:
Forms![REDEMPTION INPUT].frmPartialPay.Requery
I modified your code to add the company to the table
Code:
Private Sub CreatePayments()
On Error GoTo ErrorHandler
Dim d As DAO.Database
Dim i As Integer
Dim totnum As Integer
Dim Amnt2Ellis As Currency
Dim AmntFull As Currency
Dim AmntPerc As Double
Dim AmntDate As Date
Dim PropID As Integer
Dim strSQL As String
Set d = CurrentDb
DoCmd.SetWarnings False
If Me.txtDownPayment > 0 Then
DoCmd.OpenQuery "qryUpdateDownPayment"
End If
If Me.txtFees > 0 Then
DoCmd.OpenQuery "qryUpdateFees"
End If
DoCmd.SetWarnings True
totnum = Me.txtNumberPayments
AmntFull = Me.txtMonthlyPayments
Amnt2Ellis = AmntFull * Me.txtMPPerc
AmntPerc = Me.txtMPPerc
AmntDate = Format(Me.txtFirstPaymentDate, "Short Date")
PropID = Forms![REDEMPTION INPUT].PropertyID
For i = 1 To totnum
If i = 1 Then
strSQL = "INSERT INTO tblPartialPay ( PaymentDueDate, AmntDue, FullPaid, LoanID, Company )"
strSQL = strSQL & " VALUES (#" & AmntDate & "# " & ", " & Amnt2Ellis & ", " & AmntFull & ", " & PropID & ", '" & Me.txtCompany & "');"
' Debug.Print strSQL
d.Execute strSQL, dbFailOnError
Else
strSQL = "INSERT INTO tblPartialPay ( PaymentDueDate, AmntDue, FullPaid, LoanID, Company )"
strSQL = strSQL & " VALUES (#" & DateAdd("M", i - 1, AmntDate) & "# " & ", " & Amnt2Ellis & ", " & AmntFull & ", " & PropID & ", '" & Me.txtCompany & "');"
' Debug.Print strSQL
d.Execute strSQL, dbFailOnError
End If
Next i
ExitSub:
Set d = Nothing
Forms![REDEMPTION INPUT].frmPartialPay.Requery
Exit Sub
ErrorHandler:
MsgBox Err.Number & " " & Err.Description
Resume ExitSub
End Sub
I hope you understand the code........