I have seen tutorials which describe the TRUNCATE command in SQL. It does exactly what I want but I cant seem to get Access to recognise it. Any ideas???
There is no "TRUNCATE" function, per se, in Access VBA - however, there are several string and number functions which might serve to mimic it:
TRIM
LEFT
MID
RIGHT
INT
RND
FORMAT
and so on. Not sure which you will need, but check them all - to some people, TRUNCATE means simply displaying <numbers> with less decimal places, while to others, TRUNCATE means chopping off Characters or Digits in the original value.
Jim Me? Ambivalent? Well, yes and no....
Another free Access forum:
Which seemed to explain an sql function that deleted a table and set the auto number field back to one. This is exactly what I want o do and seems like an elegant way of doing it. However, Access does not seem to recognise it as an sql function. Any ideas,
Hmmm..yes, your second post is not quite what I had in mind either! LOL
If Access's implementation of SQL does not support the TRUNCATE command, the only way I know of to do this same thing is to "delete * from [table-name]" and do a compact/repair.
Jim Me? Ambivalent? Well, yes and no....
Another free Access forum:
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.