I have imported a textfile
this is is sample of the TEXT FILE
MAY, 5 ,2001,Rocky, ,5555, T 89
I have a form with the following event to remove blanks but it is not working properly
when I view the table there is still space on space in between
for example T 89
Can someone please help me figure out what I am doing wrong
Private Sub Export_File_Click()
Dim MyDb As Database, MySet As Recordset, stringin As String, pos As Integer
Dim charremove As Variant
Dim strin As String
charremove = left(charremove,1)
Set MyDb = DBEngine.Workspaces(0).Databases(0)
Set MySet = MyDb.OpenRecordset("labor"
MySet.MoveFirst
Do While Not MySet.EOF
strin = MySet.Fields("FIELD7"
pos = InStr(1, strin, charremove & charremove)
Do While pos
strin = Left(strin, pos - 1) & charremove & Mid(strin, pos + 2)
pos = InStr(1, strin, charremove & charremove)
Loop
MySet.Edit
MySet.Fields("FIELD12" = strin
MySet.Update
MySet.MoveNext
Loop
End Sub
this is is sample of the TEXT FILE
MAY, 5 ,2001,Rocky, ,5555, T 89
I have a form with the following event to remove blanks but it is not working properly
when I view the table there is still space on space in between
for example T 89
Can someone please help me figure out what I am doing wrong
Private Sub Export_File_Click()
Dim MyDb As Database, MySet As Recordset, stringin As String, pos As Integer
Dim charremove As Variant
Dim strin As String
charremove = left(charremove,1)
Set MyDb = DBEngine.Workspaces(0).Databases(0)
Set MySet = MyDb.OpenRecordset("labor"
MySet.MoveFirst
Do While Not MySet.EOF
strin = MySet.Fields("FIELD7"
pos = InStr(1, strin, charremove & charremove)
Do While pos
strin = Left(strin, pos - 1) & charremove & Mid(strin, pos + 2)
pos = InStr(1, strin, charremove & charremove)
Loop
MySet.Edit
MySet.Fields("FIELD12" = strin
MySet.Update
MySet.MoveNext
Loop
End Sub