Mark wrote:
I am attempting to populate several textbox controls
from VBA code. With each attempt, I get the following
error:
"The macro or function set to the BeforeUpdate or
ValidationRule property for this field is preventing
Microsoft Acess from saving the data in the field."
Naturally, I have no BeforeUpdate events or
validation rules defined for these fields. If I set
the error handler to "resume next," one textbox
is populated but the rest are not.
Of course you don't! This MSAccess, remember?
But seriously, I have no clue, but here's A
20-question game for you :)
1. Could you have at one time HAD a BeforeUpdate event
and deleted it, or changed it's name? that can
really FUBAR things-
2. On your textbox, do you have a Format set, like
"General Number" which might be fouling up your
form (if you're entering data)?
3. Is your data in your database appropriate for any
format that you've set up for the textbox control?
4. Is your Input Mask (if any) appropriate for the
data that's going into the control?
5. Do you have a validation rule?
6. Do you populate the form from a query? and if so,
does said query populate your textbox field from a
left join? If this is true, you are asking Access
to populate more than one record from a single
textbox- and Access subsequently gets very conflicted
about what to do.
Also important is how you're saving the data; if these
are unbound textboxes, it may just be you have a flat-out
bug in your SQL statement (if you're saving data THAT way)-
Just some general ideas based on the information you gave-
HTH-
KC