Listbox doubleClick

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
 
M

Mark Phillipson

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/
 

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