Access 2003 mouse down property code problem

B

Bob Waggoner

I have a combo box that I use to quickly find a record. I want the lookup
list name to disappear after use (not the combo box, just the name that was
selected), so I set the forecolor property to the backcolor property in the
after update property. (This works in Access 97.) When I try to restore the
forecolor property to 0 (black) if the user needs to change records using the
On Mouse Down event, the lookup no longer finds the record. Here's my code:

Private Sub Combo29_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[LiAttendeesID] = " & Str(Nz(Me![Combo29], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Me!Combo29.ForeColor = 16777164
End Sub

On Mouse Down property:

Private Sub Combo29_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Me!Combo29.ForeColor = 0
End Sub

If I remove the On Mouse Down code, the look up works.

What do I need to do to fix this?
 

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