Run-Time Error 2115

M

mieke

Hi,

I want to fill in a field on a from automatically in certain
conditions, but I get the following error when putting the data in it:
Run-Time Error 2115: The Macro or function set to the BeforeUpdate or
ValidationRule property for this field is preventing the database from
saving the data in the field.

I don't get this since there is no BeforeUpdate or ValidationRule
attached to this textbox. it is even not attached to the database.

This is the code I'm using:

Me!Text39.SetFocus
Me!Text39.Text = NewValue

Where NewValue is a string value and is not empty at that moment.

Thanks for your help
 
C

Carl Rapson

mieke said:
Hi,

I want to fill in a field on a from automatically in certain
conditions, but I get the following error when putting the data in it:
Run-Time Error 2115: The Macro or function set to the BeforeUpdate or
ValidationRule property for this field is preventing the database from
saving the data in the field.

I don't get this since there is no BeforeUpdate or ValidationRule
attached to this textbox. it is even not attached to the database.

This is the code I'm using:

Me!Text39.SetFocus
Me!Text39.Text = NewValue

Where NewValue is a string value and is not empty at that moment.

Thanks for your help

You can't set the value of a textbox by using the Text property. Try using
the Value property instead.

Carl Rapson
 
M

mieke

You can't set the value of a textbox by using the Text property. Try using
the Value property instead.

Carl Rapson- Tekst uit oorspronkelijk bericht niet weergeven -

- Tekst uit oorspronkelijk bericht weergeven -

This works now, thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top