Event Procedure

M

mralmackay

Hoping that someone can help with the following few queries...

1) I have the following procedure, which is used to unhide a field if
a tickbox is ticked. This works fine on the existing 'record'.
However when I navigate to other records it still remembers the tick
box option of the previous record? Any ideas?

Private Sub ContractNoExpiration_AfterUpdate()
If ContractNoExpiration = True Then
ContractNoExpirationNotes.Visible = True
Else
ContractNoExpirationNotes.Visible = False
End If
End Sub

2) I have the following procedure for when the Status is Changed to
Closed. Basically this will then set the Date Closed field to be
current date/time. However, I now need to be a bit more flexible with
this so what I'd like to do is add on an extra field within the status
table which I've named bitStatusClosed. This is either set to 0
(open) or 1 (closed). Would it be possible to amend this query to
actually look @ the attribute of the status and if it's = 1 then set
the closed date?

Private Sub Status_Change()
If Status = "Closed" Then
DateClosed = Now()
Else
DateClosed = Null
End If
End Sub

Thanks in advance for any help. Really appreciated. Al.
 
K

Ken Snell \(MVP\)

See answers in other thread that you posted just before this one.

--

Ken Snell
<MS ACCESS MVP>


Hoping that someone can help with the following few queries...

1) I have the following procedure, which is used to unhide a field if
a tickbox is ticked.


< snipped>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top