break down of a code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I am trying to implement this code template
"Me!MyMemoText=Me!myCombobox.column(?)" (where ? is the colum number, and
the columns go 0,1,2,......)into my form in the "after update" event. however
no matter what i try to change the code to so it will work in my form, i
still end up with the error "cannot find macro".

Im just wondering if someone can either please explain this code in more
details, or knows of a webpage that could help? as i cannot find either so
far.

Thanks all
 
GiBB said:
Hello all,

I am trying to implement this code template
"Me!MyMemoText=Me!myCombobox.column(?)" (where ? is the colum number, and
the columns go 0,1,2,......)into my form in the "after update" event.
however
no matter what i try to change the code to so it will work in my form, i
still end up with the error "cannot find macro".

Im just wondering if someone can either please explain this code in more
details, or knows of a webpage that could help? as i cannot find either so
far.

Thanks all

You need to put the code in the form's class module and not in the event's
"box" in the properties. Click just to the right of "After Update" and you
will get a drop-down box from where you need to choose "[Event Procedure]".
This will open the class module for the form and put the cursor into the
"After Update" event procedure. This is where the code needs to go.
Remember to compile the code to check for errors.

Keith.
www.keithwilby.com
 
Thanks Keith for this, i have put this into VB as you said, the only problem
is now, im getting the runtime error "object doesn't support this property or
method"

would this be because i am trying to link a combo box into a memo field? if
so is it true that you can extend a text field box to more then 255
characters via VB?

thanks again
 
GiBB said:
Thanks Keith for this, i have put this into VB as you said, the only
problem
is now, im getting the runtime error "object doesn't support this property
or
method"

would this be because i am trying to link a combo box into a memo field?
if
so is it true that you can extend a text field box to more then 255
characters via VB?

You want your text box to contain whatever is chosen in the combo box? Not
sure why you'd want that but this in the form's *before* update event should
do the trick:

Me.txtMyTextBox = Me.cboMyComboBox.Column(n)

using your own object names of course. Note the use of "." instead of "!"
(more info http://doc.advisor.com/doc/05352).

It doesn't matter if the text box is bound to a memo field.

Keith.
 
What im trying to do is i have a combo box with two columns, i am trying to
get a memo field to display the second column depending on what is picked in
the combo box
 
Back
Top