this is all the vba im currently using
Option Compare Database
Private Sub cboPaymentTerms_AfterUpdate()
If Me.cboPaymentTerms.Value = "Daily" Then
Me.txtMaturityBal.Value = Me.txtStartAmount * 5 * 4 * 6
ElseIf Me.cboPaymentTerms.Value = "Weekly" Then
Me.txtMaturityBal.Value = Me.txtStartAmount * 4 * 6
ElseIf Me.cboPaymentTerms.Value = "Fortnightly" Then
Me.txtMaturityBal.Value = Me.txtStartAmount * 2 * 6
ElseIf Me.cboPaymentTerms.Value = "Monthly" Then
Me.txtMaturityBal.Value = Me.txtStartAmount * 6
End If
Me.txtActualBalance.Value = Me.txtStartAmount.Value
End Sub
Private Sub txtStartDate_AfterUpdate()
Me.txtMaturityDate.Value = DateAdd("m", 6, Me.txtStartDate.Value)
End Sub
Public Function MaxPID()
MaxPID = CurrentDb.OpenRecordset("qryMaxPID").Fields(0)
End Function
when i try to save my file and exit i get the error "The Search key was not found in any record".
i get the Customer Id from my customer table via query
i get the new PartnerId from query +1 from partner table
why do i keep getting this error
Option Compare Database
Private Sub cboPaymentTerms_AfterUpdate()
If Me.cboPaymentTerms.Value = "Daily" Then
Me.txtMaturityBal.Value = Me.txtStartAmount * 5 * 4 * 6
ElseIf Me.cboPaymentTerms.Value = "Weekly" Then
Me.txtMaturityBal.Value = Me.txtStartAmount * 4 * 6
ElseIf Me.cboPaymentTerms.Value = "Fortnightly" Then
Me.txtMaturityBal.Value = Me.txtStartAmount * 2 * 6
ElseIf Me.cboPaymentTerms.Value = "Monthly" Then
Me.txtMaturityBal.Value = Me.txtStartAmount * 6
End If
Me.txtActualBalance.Value = Me.txtStartAmount.Value
End Sub
Private Sub txtStartDate_AfterUpdate()
Me.txtMaturityDate.Value = DateAdd("m", 6, Me.txtStartDate.Value)
End Sub
Public Function MaxPID()
MaxPID = CurrentDb.OpenRecordset("qryMaxPID").Fields(0)
End Function
when i try to save my file and exit i get the error "The Search key was not found in any record".
i get the Customer Id from my customer table via query
i get the new PartnerId from query +1 from partner table
why do i keep getting this error