B
Bob
Form using bound textbox as well as a combobox
textbox is bound to table1.field1 combobox is a lookup in table2
In a button click event on the form, if I write
Textbox = "123456"
DoCmd.GoToRecord , , acNext
This works fine,
However if I replace the assignment
Textbox = "123456" with
textbox = GetNewValue(Someparameter) this GetNewValue does a lookup in
table2
(opens a DAO recordset, Dynaset type, finds a fieldvalue, increments it,
does an edit then an update,closes the recordset and returns the incremented
value), works fine
But after it returns the value the asigment to textbox does not work, I get
an error message data has been changed.
Can anyone help me with this how do I assign the returned value?
Thanks,
Bob
textbox is bound to table1.field1 combobox is a lookup in table2
In a button click event on the form, if I write
Textbox = "123456"
DoCmd.GoToRecord , , acNext
This works fine,
However if I replace the assignment
Textbox = "123456" with
textbox = GetNewValue(Someparameter) this GetNewValue does a lookup in
table2
(opens a DAO recordset, Dynaset type, finds a fieldvalue, increments it,
does an edit then an update,closes the recordset and returns the incremented
value), works fine
But after it returns the value the asigment to textbox does not work, I get
an error message data has been changed.
Can anyone help me with this how do I assign the returned value?
Thanks,
Bob