update a field in a record with a query , parameter under a save b

G

Guest

Hi,

I have a access 2000 form which is linked to a table.

This form has calculated text fields. So far, when a user hits the save
button on the form it saves all the control source textboxes for the current
record.

I created a query that has a forms![formname]![txt1] parameter.
It updates a field for the record by performing a calculation on 2 other
fields.

I put docmd.openquery under the save button along with the autogenerated
save code to save all the other normal fields.

When I press the save button, I get the standard messages: "you are about to
update records in the table.." and another standard "you have updated 1
record..."

I know that you can go into access and set the options for these warning
messages to not appear but how can I do it so only does not show for this
particular instance.

Do I need to re-design completely how to do this?

Thanks

Chris
 
S

Sal Rosario

You can include:
DoCmd.SetWarnings False
to deactivate warnings before your code and:
DoCmd.SetWarnings True
to activate them back
 

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