Can I change a value in table

E

ericsson

Hi
I´ve tryed to type a Sub in a Module, and it should change a value in
table.

In a open form, I change the value with the 'Me![Feld1] = newvalue' syntax.

Can I do the same in a table ? Wath´s the syntax?

Does anyone now a good Internetsite with examples regarding Access.

//Lasse
 
A

Allen Browne

Execute an Update query statement.

1. Create a query into this table.
2. Change it to an Update query.
3. Drag Field1 into the grid.
4. Type the newvalue into the Update row.
5. Add any criteria you need to get the right row.
6. Switch to SQL View (View menu).

You can now see the string you need to create.
You code will then be:
strSQL = "UPDATE ...
dbEngine(0)(0).Execute strSQL, dbFailOnError
 
Top