Solved

Copy value from List Box using Double Click Event

Posted on 2007-03-31
21
405 Views
Last Modified: 2013-11-28
I have an unbound list box with values that I would like to populate a memo field using a double click event. Any suggestions. The memo text box is bound to a table. I was hoping there would be a simple On_Double_Click event procedure that can copy the value to the memo field.
0
Comment
Question by:johnberniejones
  • 6
  • 5
  • 5
  • +3
21 Comments
 
LVL 28

Accepted Solution

by:
burrcm earned 500 total points
ID: 18828414
In the On Double Click event select Event Procedure and enter this  memo = Text1 where memo is your bound memo field and text1 is your unbound list box.

Chris B
0
 

Author Comment

by:johnberniejones
ID: 18828459
I've just realised I can select copy and paste using simple ctrl c and v keys... Thanks
0
 
LVL 28

Expert Comment

by:burrcm
ID: 18828474
You can, but double clicking the item in the list works fine, so why not...

Chris B
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 18829228
Assuming:

txtMemo  is your text box linked to memo filed
lstOptions is your list box to choose from.

On the dbl click event (of this list box) have:

  txtMemo  = Nz(txtMemo)  & ", " *  lstOptions

this will add your choise to the existing value of the list box seperated by a comma.

Mike
0
 
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 18829235
correction:

txtMemo  = Nz(txtMemo)  & ", " &  lstOptions

to avaid the comma in case there was no value int the memo field, use:

txtMemo  = iif(Nz(txtMemo,"")="", "",  ", ") &  lstOptions
0
 
LVL 75
ID: 18829238
How can you Copy and Paste from a List box ??

In the On Dbl Click event of the List box:

Me.YourMemoFieldTextBoxName = Me.YourListBoxName ...

mx
0
 
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 18829336
just as you have it:

Me.YourMemoFieldTextBoxName = Me.YourListBoxName

When you double click on the list box like

City:          
----------------
Los Angeles  |  
San Diego     |
.                    |
.                    |
.                    |
-----------------
   ^-- lstCity
When you double click on this list box, say on San Diego option, using:

Me!txtMemo = Me!lstCity

puts San diego into txtMemo box.

Mike
0
 
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 18829343
Here the code needs to be in the double click event of the list box (if wasn't made it clear).

Mike
0
 
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 18830773
Is there any additional concerns you may have?

Thanks,

Mike
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 18840596
DatabaseMX:,
<How can you Copy and Paste from a List box >
... just like you can with a combobox. It will copy the data in the Bound column.
(But I would still rather use automation)

Jeffc
0
 
LVL 75
ID: 18840624
Well I'll be .... $*(@&^!^!*(@^!

Funny ... never really needed to or tried to do that.  The little things we miss.  That's why we are all here.

Thank You Jeff ...

mx
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 18840702
LOL
<That's why we are all here>
I know...

Some wise expert here finally explained to me how to Re-index/optimize my queries.
;)

Jeffc
0
 
LVL 75
ID: 18840721
Really! Who was that?

mx
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 18840773
I think it was that rap artist...DMX!
;)
0
 
LVL 75
ID: 18840801
The little things I ... FORGET ... man, what a day!!
What thread was that ... seriously, I forgot.

mx
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 18841016
0
 
LVL 75
ID: 18841080
Aahh so.  Well, like I said, there is some conflicting info.  That post was the most recent info I've across.  However, I'm going to cross check all of that ... cuz I want to be sure it's 100% accurate. Like, that part about C&R re-optimizing stored queries ... don't recall hearing that per se in the past.

My partner and I did confirm some other stuff on indexes yesterday ... which is ... when you create a say ... a one to many (real) relationship (with ref integrity = yes) between two tables, Access automatically creates a hidden index on the field in the Many table. You won't see it in the properties for that field in table design view - it will say Indexed=No ... BUT ... if you enumerate tabledefs/indexes on that (Many) table, you WILL see it. AND ... if you go ahead and set Indexed=Yes for that field ... you will actually end up with two (duplicate) indexes!!  

This becomes important when you start to reach the 32 index limit in any one table ..ie, there may be hidden indexes you do see listed in the Index (lighting bolt) dialog ... which was the case with and mdb he inherited .. and was trying to create another relationship on that table ... and Access said: "Sooo sorree, 32 index limit exceeded!!!"


mx
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 18874585
johnberniejones,

Your original question:
<I have an unbound list box with values that I would like to populate a memo field using a double click event.>

burrcm, proposed solution:
< memo = Text1 >

Your reply:
<I've just realised I can select copy and paste using simple ctrl c and v keys... Thanks>

However your own "Solution" does satisfy the "Double-Click" criteria you set forth in the original question?

Jeff Coachman


0
 
LVL 75
ID: 18944397
Do we have a resolution to this question?  Just checking ...

mx
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21130243
Forced accept.

Computer101
EE Admin
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question