M
magmike
I currently have the following code under the onCurrent of my form:
Private Sub Form_Current()
Dim strSQL As String
Dim db As DAO.Database
If Me.ID < 0 Then
Set db = DBEngine(0)(0)
strSQL = "INSERT INTO LastVisitedRecord ( lvCompanyID ) " _
& " VALUES ( " & Me.ID & " ) "
db.Execute strSQL
Set db = Nothing
End If
End Sub
However, I'd like to add something to it, but have not had success.
I'd like the form to evaluate if the NOTES field is empty (the NOTES
field is actually on the subform OldNotesSubForm which is not visible
unless the OldNotesLabel is clicked on) and if so, make other controls
and labels not visible. These controls are:
OldNotesLabel
OldNotesBox
OldNotesSubForm
the old notes subform (which contains the NOTES field) is visible =
false until the OldNotesLabel is clicked on.
Thanks in advance for your help!
magmike
Private Sub Form_Current()
Dim strSQL As String
Dim db As DAO.Database
If Me.ID < 0 Then
Set db = DBEngine(0)(0)
strSQL = "INSERT INTO LastVisitedRecord ( lvCompanyID ) " _
& " VALUES ( " & Me.ID & " ) "
db.Execute strSQL
Set db = Nothing
End If
End Sub
However, I'd like to add something to it, but have not had success.
I'd like the form to evaluate if the NOTES field is empty (the NOTES
field is actually on the subform OldNotesSubForm which is not visible
unless the OldNotesLabel is clicked on) and if so, make other controls
and labels not visible. These controls are:
OldNotesLabel
OldNotesBox
OldNotesSubForm
the old notes subform (which contains the NOTES field) is visible =
false until the OldNotesLabel is clicked on.
Thanks in advance for your help!
magmike