The details for the code..
Hi,
Could sombody let me know the details of the following code word by word:
VB Code:
Private Sub cboAccType_Click()
Set rsTemp = New ADODB.Recordset
rsTemp.Open "Select * FROM tblAccTypes WHERE AccountName='" & cboAccType.Text & "'", cnBank, adOpenKeyset, adLockOptimistic
With rsTemp
If .RecordCount > 0 Then
lblMin = !MinBalance
Else
Exit Sub
End If
End With
End Sub
Edit: Added [vbcode][/vbcode] tags for clarity. - Hack
Re: The details for the code..
VB Code:
Private Sub cboAccType_Click() '<== start of combo box click event
Set rsTemp = New ADODB.Recordset '<== create new recordset object
rsTemp.Open "Select * FROM tblAccTypes WHERE AccountName='" & cboAccType.Text & "'", cnBank, adOpenKeyset, adLockOptimistic '<== select all records from acctypes table that match what was selected from the combox box
With rsTemp '<== Begins the with
If .RecordCount > 0 Then '<== if records were returned
lblMin = !MinBalance '<== update a label with the contents of the field MinBalance
Else '<=== Else
Exit Sub '<== leave and dont do anything else
End If '<== Ends the If
End With '<== Ends the With
End Sub '<== Ends the Sub
Re: The details for the code..
Thanks a lot for your kind reply. Can I get some information regarding code like you have mentioned on any website plz.
Re: The details for the code..
Quote:
Originally Posted by user3377
Thanks a lot for your kind reply. Can I get some information regarding code like you have mentioned on any website plz.
You can get information on it right here.
What is your specific question or questions?