 |
user777 Level: Scholar
 Registered: 18-09-2005 Posts: 40
|
What does it mean?
Hi,
Why this code is written for. Could somebody help me to understand the code?
Private Sub text5_Change()
If rs.RecordCount <> 0 Then
ctrl_unlock
Else
ctrl_lock
End If
End Sub
____________________________
user777
|
|
13-10-2005 at 10:06 AM |
|
|
stickleprojects Level: Moderator

 Registered: 09-09-2002 Posts: 891
|
Re: What does it mean?
Hi,
judging from the name of the routines (ctrl_lock and ctrl_unlock), this is the "english" version of this code:
"Whenever the contents of the textbox called Text5 are changed (by code or by user typing), check if there are records in the recordset called rs. If there are, then enable the controls (presumably to allow editing), if not, disable the controls."
It doesn't seem very logical to check this on a change of a text value to me, but that is what it appears to do!
Hope this helps,
Kieron
____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)
|
|
13-10-2005 at 11:24 AM |
|
|
|
|
 |
 |