By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,105 Members | 1,040 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,105 IT Pros & Developers. It's quick & easy.

List Box DoubleClick

P: n/a
DS
Is there a way to doubleclick on an item in a listbox which would then
open a form? Each item in the list box would have to open a different form.
Thanks
DS
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
take a look at the double click event for the list box.

Nov 13 '05 #2

P: n/a
DS
misscrf wrote:
take a look at the double click event for the list box.

That works to open a form, but the problem is when you click anywhere in
the box the form opens. I need to open a different form for each item
or value in the listbox.
Thanks
DS
Nov 13 '05 #3

P: n/a
Try:

If Me!myListBox.column(0) = "FirstValue" then
DoCmd.OpenForm "myForm1"
Elseif Me!myListBox.column(0) = "2ndValue" then
DoCmd.OpenForm ":myForm2"
' as many as you need. Can you really count on the listbox valuse
remaining static?
'list/combo boxes start their columns with 0, so the second column (if
you are using a 'zero width ID in the first column) would be 1.
End If

-Ed
"DS" <bo******@optonline.net> wrote in message
news:cU*****************@fe08.lga...
misscrf wrote:
take a look at the double click event for the list box.

That works to open a form, but the problem is when you click anywhere in
the box the form opens. I need to open a different form for each item or
value in the listbox.
Thanks
DS

Nov 13 '05 #4

P: n/a
DS
Ed Robichaud wrote:
Try:

If Me!myListBox.column(0) = "FirstValue" then
DoCmd.OpenForm "myForm1"
Elseif Me!myListBox.column(0) = "2ndValue" then
DoCmd.OpenForm ":myForm2"
' as many as you need. Can you really count on the listbox valuse
remaining static?
'list/combo boxes start their columns with 0, so the second column (if
you are using a 'zero width ID in the first column) would be 1.
End If

-Ed
"DS" <bo******@optonline.net> wrote in message
news:cU*****************@fe08.lga...
misscrf wrote:
take a look at the double click event for the list box.


That works to open a form, but the problem is when you click anywhere in
the box the form opens. I need to open a different form for each item or
value in the listbox.
Thanks
DS


Sounds good, except when you static, do uo mean always changing? The
list box will always be changing.
Thanks,
DS
Nov 13 '05 #5

P: n/a
No, dynamic would be changing. Static means won't change.

I had a solution like that and had to change it for the same reason.
You might try a table that has those values with their respective form
to open in another column. Then you can do a where listbox = listbox
open form = listbox.column (#) <--# column with name of form.
Something like that.
misscrf

It is never too late to become what you could have been ~ George Eliot

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.