Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 01-13-2012, 01:40 AM   #1
shutzy
Newly Registered User
 
Join Date: Sep 2011
Location: Wesham, Lancashire, UK
Posts: 775
Thanks: 105
Thanked 4 Times in 4 Posts
shutzy is on a distinguished road
pass list value to a text box on click event

i want to be able to pass a unique ID from a list box on click to a text box. i know how to do this when opening a new for at a certain record but i want to be able to do it on the same form.

the code i have tried is

"txtOrdersItemsID =" & Me.lstTreatmentHistory

i used this in the run code macro in the on click even of the list box.

can anyone tell me where i am going wrong please.

shutzy is offline   Reply With Quote
Old 01-13-2012, 01:51 AM   #2
shutzy
Newly Registered User
 
Join Date: Sep 2011
Location: Wesham, Lancashire, UK
Posts: 775
Thanks: 105
Thanked 4 Times in 4 Posts
shutzy is on a distinguished road
Re: pass list value to a text box on click event

ive kind of managed to do it.

in macros SetValue
[txtOrdersItemsID]
[lstTreatmentHistory].[ItemData](0)

this does it only once. i would like to be able to click more than once and the text box changes. which event should i put the SetValue to or do i need to expand on that.
shutzy is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dbl Click event on a list generating error please help campanellisj Forms 9 08-18-2010 11:40 AM
List Box Double Click event decreasing numbers Firefly Forms 0 01-12-2008 10:57 AM
Pass selected value in list to text box casper Forms 3 12-07-2006 11:02 AM
pass value from text box to combobox force AfterUpdate Event thebridge Forms 6 08-21-2006 06:22 AM
List Box Double Click Event Please Help TheViruz30 Forms 3 02-12-2006 01:51 PM




All times are GMT -8. The time now is 05:16 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World