dblclick event code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a list box on a form that looks up values in a query and would like to
double click a value in the list box and bring up that record on the active
form.
 
for another form

Private Sub List3_DblClick(Cancel As Integer)
if not isnull(me.list3.column(0)) then
DoCmd.OpenForm "FrmTest", , , "myID=" & Me.List3.Column(0)
else
msgbox "please double click an entry"
end if
End Sub

for this form

Private Sub List3_DblClick(Cancel As Integer)
if not isnull(me.list3.column(0)) then
me.recordsource = "Select * from TblTest Where myID=" &
me.list3.columm(0)
me.requery
else
msgbox "please double click an entry"
end if
End Sub
 

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

Back
Top