F
Fred Boer
Hello:
Ok, ok, so I obviously am sadly lacking in the amount of documentation in my
code... Mea Culpa! Mea Culpa! Mea Maxima Culpa!
I've just noticed odd lines in two different subs in my application. (I've
reproduced the subs below.)
I have *no* idea what "Me.Tag=-1" and "Me.Tag=0" are doing in my code. I
understand that they would set the "Tag" property for (I think) the form to
be either True or False. However, I can't find any other code that might
need my forms to have this property set! I have no recollection of how or
why they are there, and, yes, there is not documentation thanks to the lazy
slob who wrote the code. <g>
Does this usage look familiar to anyone? I've commented it out and
everything *seems* ok, but...
Thanks!
Fred Boer
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
Me.Tag = -1
DoCmd.Maximize
Exit_Form_Open:
Exit Sub
Err_Form_Open:
fncWRMSErrMsg err.Number, err.Description
Resume Exit_Form_Open
End Sub
Private Sub cboPatronFullName_AfterUpdate()
On Error GoTo Errorhandler
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Fullname] = '" & Me![cboPatronFullname] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Me.cboPatronFullname = Null
Me.Tag = 0
If Me.txtPatronType_ID <> 0 Then
Me.txtStaffFullname.Visible = False
Else
Me.txtStaffFullname.Visible = True
End If
Exitpoint:
Exit Sub
Errorhandler:
fncWRMSErrMsg err.Number, err.Description
Resume Exitpoint
End Sub
Ok, ok, so I obviously am sadly lacking in the amount of documentation in my
code... Mea Culpa! Mea Culpa! Mea Maxima Culpa!
I've just noticed odd lines in two different subs in my application. (I've
reproduced the subs below.)
I have *no* idea what "Me.Tag=-1" and "Me.Tag=0" are doing in my code. I
understand that they would set the "Tag" property for (I think) the form to
be either True or False. However, I can't find any other code that might
need my forms to have this property set! I have no recollection of how or
why they are there, and, yes, there is not documentation thanks to the lazy
slob who wrote the code. <g>
Does this usage look familiar to anyone? I've commented it out and
everything *seems* ok, but...
Thanks!
Fred Boer
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
Me.Tag = -1
DoCmd.Maximize
Exit_Form_Open:
Exit Sub
Err_Form_Open:
fncWRMSErrMsg err.Number, err.Description
Resume Exit_Form_Open
End Sub
Private Sub cboPatronFullName_AfterUpdate()
On Error GoTo Errorhandler
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Fullname] = '" & Me![cboPatronFullname] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Me.cboPatronFullname = Null
Me.Tag = 0
If Me.txtPatronType_ID <> 0 Then
Me.txtStaffFullname.Visible = False
Else
Me.txtStaffFullname.Visible = True
End If
Exitpoint:
Exit Sub
Errorhandler:
fncWRMSErrMsg err.Number, err.Description
Resume Exitpoint
End Sub