I am dowloading some records (sales orders) from a Pervasive SQL server,
the table has the following fields
SO, double
CUSCOD, text
SODESC, text
ratter than doing a query like this:
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE BKARINV SET BKARINV.CUSCOD = [BKARINV]![CUSCOD],
BKARINV.SODESC = [BKARINV]![SODESC];"
DoCmd.SetWarnings True
I would like to have a vba code, the BKARINV table has 37 columns (would
be a longggggg query)
Why?? Pervasive fills in the entire field. Example:
The CUSCODE 's field lenght is 15 characters, but if you enter "JOHN",
eventhough "JOHN" has only 4 characters
Pervasive fill the rest with something!!! The only way to clear that
"something" is by using the Trim funcion.
Thanks for your time.
Regards,
Bre-x
Douglas J. Steele said:
Can you give an example of what you're trying to do?
In general, it's almost always more efficient to use SQL rather than VBA
if
it's possible to do the same thing either way.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Is there a way to use VBA to trim and entire record?
I have a table that has 37 columns, each column need to be "trim"
I know that I can create a update query, but I would be really handy if
VBA
can be use it.
Regards,
Bre-x