|
-
Sep 22nd, 2005, 08:17 AM
#1
Thread Starter
Junior Member
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
Last edited by Hack; Sep 22nd, 2005 at 08:27 AM.
-
Sep 22nd, 2005, 08:32 AM
#2
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
-
Sep 22nd, 2005, 09:03 AM
#3
Thread Starter
Junior Member
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.
-
Sep 22nd, 2005, 09:06 AM
#4
Re: The details for the code..
 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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|