Access Combo Box controls for current record only

G

Guest

I have created a form to keep track of a video collection. I have 2 combo
boxes and a text box that are "linked". The first combo box is a yes/no box
that tells if the video is owned. The second combo box is a list box that has
options such as "currently with Bob" or "currently with Joe", etc. The text
box is a "checked out to..." box that allows users to enter a name.

I have written the code in VBA to disable the 2nd combo box and text box if
the first combo box is set to "no". My problem is that the code works but
disables the 2nd combo box and text box for all records rather than just for
that record. I need to have each record independent of the others in this
regard.

Here is the code I have for the 1st combo box:

Private Sub OriginalCopy1_AfterUpdate()
If OriginalCopy1.Value = "No" Then
CheckoutStatus1.Enabled = False
CheckoutStatus1.Value = ""
CheckedOutTo1.Enabled = False
CheckedOutTo1.Value = ""
Else
CheckoutStatus1.Enabled = True
CheckedOutTo1.Enabled = True
End If
End Sub

Please help me!
 
G

Guest

Cancel that. I had searched for this previously but wasn't able to find an
answer. However, I just found my answer indirectly by looking at the other
posts to similar questions. The problem was that I was not putting this code
on the OnCurrent property for the form as well. I don't remember who posted
the info I was looking for, but thanks to everybody just in case. I love
this forum.
 

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