in the code. when I Combiled it the error:- Compile error: End If without
block If. Was produced. Changing it ti End Sub enabled it to compile, but
Great, the reason why we compile each we change code is *exactly* why as
above. You are 100% correct, I should have typed
end Sub, but by habit, I typed end if (my mistake sorry - but, hey, we still
learned some cool stuff here!!!).
there is no msgbox displayed.
The msgox will ONLY display (and that code will ONLY RUN when you change the
value of the combo box. If that code does not run, then I going to suggest
that you delete the combo box. Re-create the combo box with the wizard.
then, while in design mode, display the properties sheet for that combo box,
move to the events tab, and then click on the after update field. Then click
on the [...] button that shows. Choose code, and enter your code as:
msgbox me.ProductName.Column(2)
Me.UnitPrice = Me.ProductName.Column (2)
(of course, ms-access will put in the sub -- end sub part for you. Take
careful note of the name given
eg:
ProdNme, ProductName..whatever,...your code must MATCH the name given to
the control by ms-access.
After doing the above, does the msgbox box work now? We MUST get the msg box
command to work!!! (everything else is a waste of time.....).
That msgbox will only fire (and that code only run) when you change actually
use the combo box, and change the value. So, can you get the msgbox to work?