Listbox doubleClick

  • Thread starter Thread starter quixote
  • Start date Start date
Q

quixote

I have a listbox that populates with names. I am not sure
how to do the following. I would like to be able to
doubleclick on one of the names and open another form with
information on that name.

Logic

Open form based on query where query.name = listbox.name
selected.


I'm having some trouble using listbox properties.

Thanks
 
Hi,

You need code like the following in the list box double click event:

If Len(Me.lstNames & "") > 0 Then
DoCmd.OpenForm "frmSomeFormName", acNormal, , _
"[SomeTextField] = '" & Me.lstName & "'"
End If

The OpenForm Method has a WhereCondition argument that will filter the form
when opened.


--

Cheers
Mark

Free Access/Office Add-Ins at:
http://mphillipson.users.btopenworld.com/
 
Back
Top