I Have A Form (frmLoan) With Loan Details And I Have Made Another Form(frmLoanSum mary)
In the frmLoanSummary I have Placed A Listview On It. How Can I get the information off of the (frmLoan) To appear in the listview.
Can Someone show me....
The Code I have for frmLoan
How Can I do This With a ADODC Recordset
lee123
In the frmLoanSummary I have Placed A Listview On It. How Can I get the information off of the (frmLoan) To appear in the listview.
Can Someone show me....
The Code I have for frmLoan
Code:
Private Con As New ADODB.Connection
Private Rec As New ADODB.Recordset
Private Sub cmdAdd_Click()
AddNewLoan
txtLoanID.SetFocus
End Sub
Private Sub cmdEnter_Click()
UpdateRecords
End Sub
Private Sub cmdNext_Click()
Rec.MoveNext
Call LoadTextboxes
End Sub
Private Sub cmdPrevious_Click()
Rec.MovePrevious
Call LoadTextboxes
End Sub
Private Sub Form_Load()
ConnectToDatabase
End Sub
Private Sub mnuSummary_Click()
frmLoanSummary.Show
Unload Me
End Sub
Private Sub LoadTextboxes()
On Error Resume Next
txtLoanID = Rec("loanID")
txtLoaner = Rec("loanersname")
txtAmountOfLoan = Rec("AmountOFLoan")
txtPaymentOf = Rec("paymentof")
txtDescriptionOfLoan = Rec("description")
txtDateMailed = Rec("datemailed")
txtPaymentType = Rec("paymenttype")
txtLoanBalance = Rec("LoanBalance")
txtReferenceNumber = Rec("referencenumber")
txtLoanBalance = txtAmountOfLoan - txtPaymentOf
Label6.Caption = "Left On The Loan"
TextBoxCurrency
TextFontSizeAndColor
End Sub
Private Sub TextBoxCurrency()
txtAmountOfLoan = FormatCurrency(txtAmountOfLoan)
txtLoanBalance = FormatCurrency(txtLoanBalance)
txtPaymentOf = FormatCurrency(txtPaymentOf)
End Sub
Private Sub TextFontSizeAndColor()
txtLoanBalance.FontBold = True
txtLoanBalance.ForeColor = vbRed
End Sub
Private Sub ConnectToDatabase()
Con.Provider = "Microsoft.jet.oledb.4.0; "
Con.Open "C:\LoanInformation.mdb"
Rec.Open "Select * From LoanT", Con, adOpenDynamic, adLockOptimistic
Call LoadTextboxes
End Sub
Private Sub AddNewLoan()
Rec.AddNew
txtLoanID = vbNullString
txtLoaner = vbNullString
txtAmountOfLoan = vbNullString
txtPaymentOf = vbNullString
txtDescriptionOfLoan = vbNullString
txtDateMailed = vbNullString
txtPaymentType = vbNullString
txtLoanBalance = vbNullString
txtReferenceNumber = vbNullString
txtLoanBalance = vbNullString
End Sub
Private Sub UpdateRecords()
Rec.Update
Rec("loanid") = txtLoanID
Rec("loanersname") = txtLoaner
Rec("Amountofloan") = txtAmountOfLoan
Rec("paymentof") = txtPaymentOf
Rec("description") = txtDescriptionOfLoan
Rec("DateMailed") = txtDateMailed
Rec("paymenttype") = txtPaymentType
Rec("loanbalance") = txtLoanBalance
Rec("referencenumber") = txtReferenceNumber
End Sub
Private Sub txtPaymentOf_LostFocus()
Call LoadTextboxes
End Sub
lee123
Comment