Hi,<br>
I'm writing data from a flexgrid to a table in Access 97.<br>
What is the command to clear the table before it is written to?<br>
<br>
Thanks,<br>
Jason
Here is one way I have used to clear an Access table:<br>
With [variable name of table here]<br>
If Not (.EOF And .BOF) Then .MoveFirst<br>
Do Until .EOF<br>
.Delete<br>
.MoveNext<br>
Loop<br>
End With<br>
<br>
Hope that helps!<br>
kleo<br>
<br>
kleo9@hotmail.com<br>
you could also do this with an sql statement:<br>
<br>
<br>
myDB.execute ("delete * from mytable;")<br>
<br>
where myDB has been properly opened using<br>
<br>
set myDB = dbengine.workspaces(0).opendatabase("c:\mydata.mdb") substitute your own path<br>
<br>
quick easy and fast<br>
<br>
<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.