How can i copy a value of an listbox

sven2

Registered User.
Local time
Today, 12:18
Joined
Apr 28, 2007
Messages
297
Hello,

On a form I have a listbox (lsttotalpersons) that returns an number. I want to copy that number into a textbox (txttotal) in another form and I tried it like this:

me.form.txttotal = me.lsttotalpersons.value

But this isn't working!

Can somebody help me with the right syntax to copy the value?

Thanks in advance,
Sven.
 
Try something like:

form![YourtherFormName].txttotal = Me.lsttotalpersons.value


Note: Me refers to the current form/report where the VBA code exisits.
 

Users who are viewing this thread

Back
Top Bottom