Get teh value from one form to another

A

alvin Kuiper

Hi
Have this combobox with values from a table
this works fine
Then i have cmd button there open a form
in this form i shall write a new value in another table
but i shall also use the value from the other forms
combobox
I have try many things but get only the result 0 in this field
I don't understand why
In the second form, the one i open to write a new value i have try to use:
= [maidnr] = Forms![opret/rette]![cmomaerke]

regards
Alvin
 
M

Marshall Barton

alvin said:
Have this combobox with values from a table
this works fine
Then i have cmd button there open a form
in this form i shall write a new value in another table
but i shall also use the value from the other forms
combobox
I have try many things but get only the result 0 in this field
I don't understand why
In the second form, the one i open to write a new value i have try to use:
= [maidnr] = Forms![opret/rette]![cmomaerke]


You can not assign a value to a dield using an expression in
a text box. The use of the expression precludes binding the
text box to a field in the form's record source table/query.
In stead, you need to use a line of VBA code in an event
procedure.

I don't know where you may want to do it, perhaps in the
form's Load event??

Me.maidnr = Forms![opret/rette]!cmomaerke
 
Top