Error 3331 & validation rule error

T

tope12

I made this data entry from that uses the .addnew method to add records to a
query recordsource. When i enter a value into a text box, i run a parameter
query by code to fill in another textbox on the form. when i execute the
addnew method,it saves the record. when i enter a value into my textbox to
run the parameter query for the new record. I get Error 3331 "to make changes
to this field,first save the record". I tried to add a DoCmd.RunCommand
acSaveRecord after .update in the addnew method,but it didn't work. Are
there any to get around that error? I also get a validation rule error when
i try to change the recordsource after i add a couple of records.
 
H

hor vannara

tope12 said:
I made this data entry from that uses the .addnew method to add records to
a
query recordsource. When i enter a value into a text box, i run a
parameter
query by code to fill in another textbox on the form. when i execute the
addnew method,it saves the record. when i enter a value into my textbox to
run the parameter query for the new record. I get Error 3331 "to make
changes
to this field,first save the record". I tried to add a DoCmd.RunCommand
acSaveRecord after .update in the addnew method,but it didn't work. Are
there any to get around that error? I also get a validation rule error
when
i try to change the recordsource after i add a couple of records.
 

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