Exporting all fields in one stream

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

access97

I need to export some data fixed width and in one stream. The stream will
be 128 charters long. I have used the

xxx.txt for output as OP
and then
Print OP, F1, F2, F3, etc.

Data would look like this:

F1F2F3F4F5, etc.

My question is how do I make the fields be a certain length and not change
when they are null, or numeric?
Also, is there a better way to export this out besides using the method above?
 
Use the LSet function to assign the values to fixed-width strings ...

Public Sub TestLSet()

Dim stfFixed As String * 10
LSet stfFixed = "123"
Debug.Print "|" & stfFixed & "|"

End Sub

Result in the Immediate window ...

testlset
|123 |
 
Back
Top