delete all

  • Thread starter Thread starter sue
  • Start date Start date
Hi Sue,

Dim strSql as String

strSql = "Delete From yourTableHere"
CurrentDb.Execute strSql, dbFailOnError
 
Thanks Dan,

Can I use the same sort of thing to update a value in a
one column table with no primary key. I am holding a
date there you see.

my table is called tbllastsync
the column or field is called datelastsync

I want to update the current value to todays date.

My thinking was to delete it then write it as today but
setting to defailt doesnt have the desired effect.

thanks again

sue
-----Original Message-----
Hi Sue,

Dim strSql as String

strSql = "Delete From yourTableHere"
CurrentDb.Execute strSql, dbFailOnError

--
HTH
Dan Artuso, Access MVP


"sue" <[email protected]> wrote in
message news:[email protected]...
 
Hi,
Do you mean you want to update the all rows of the datelastsync
field to today's date?
Or do you want to somehow identify one row to be updated?

If all rows:
Dim strSql as String

strSql = "Update tblastsync Set datelastsync = #" & Date() & "#"
CurrentDb.Execute strSql, dbFailOnError
 
Thanks I adapted it.

Brilliant
-----Original Message-----
Hi,
Do you mean you want to update the all rows of the datelastsync
field to today's date?
Or do you want to somehow identify one row to be updated?

If all rows:
Dim strSql as String

strSql = "Update tblastsync Set datelastsync = #" & Date () & "#"
CurrentDb.Execute strSql, dbFailOnError


--
HTH
Dan Artuso, Access MVP


"Sue" <[email protected]> wrote in
message news:[email protected]...
 
Back
Top