Solved Checkbox question

Again a better explanation of exactly what you want to do would help to get more focused answers. Do you want to limit the selection to one record or multiple records? If one record the code is simple, if multiple its still easy but more complex.

example:

The last question on this if I may.

I want to pass the value from the first column within the listbox (on Form 2) to a text box on Form3 (Form 3 will be open) .

The code I was trying to implement is

Me.Listbox0.Columns(0) = [Forms]![Form3].TxtBoxName

However, I'm getting runtime error 424 with the above code.

Many Thanks.
 
In post#17 I suggested using the AfterUpdate event of the listbox. On reflection, I think its Double Click event might be better.
 
In post#17 I suggested using the AfterUpdate event of the listbox. On reflection, I think its Double Click event might be better.

Thanks for the reply, I have it in the on click event. There's something I'm obviously missing!

These are elementary questions but I'm a vba novice.

Thanks
 
Thanks for the reply, I have it in the on click event. There's something I'm obviously missing!

These are elementary questions but I'm a vba novice.

Thanks
Click or Double click would be fine, I think, just not in the After Update that I originally suggested :)
 
Click or Double click would be fine, I think, just not in the After Update that I originally suggested :)

Thanks :)

Do you have any suggestions on why the code above isn't working? I've posted the run time error that I'm getting. I'm just trying to pass the value in the listbox to a textbox in another form. the other form has an unbound textbox in it.
 
Thanks :)

Do you have any suggestions on why the code above isn't working? I've posted the run time error that I'm getting. I'm just trying to pass the value in the listbox to a textbox in another form. the other form has an unbound textbox in it.
I can't see any code but if you post some I may be able to comment :unsure:
 
The last question on this if I may.

I want to pass the value from the first column within the listbox (on Form 2) to a text box on Form3 (Form 3 will be open) .

The code I was trying to implement is

Me.Listbox0.Columns(0) = [Forms]![Form3].TxtBoxName

However, I'm getting runtime error 424 with the above code.

Many Thanks.
Well your assignment is the wrong way around?
 
I think by that backwards assignment you've demonstrated one of the rare causes for the error: you may have two valid references, but you are trying to perform an invalid action on it - you cannot set the value of a listbox column (AFAIK)

@ProgramRasta, please always post the error number and at least an approximation of the message. There must be nearly three thousand of them and it would be nice if we didn't have to look them up when you post just the number. Thanks.
 

Users who are viewing this thread

Back
Top Bottom