Help

seany

Registered User.
Local time
Today, 19:03
Joined
Sep 1, 2003
Messages
53
Dim j As Integer

For j = 1 To Len(Bridge) 'Bridge = A702-10-C10 and output to A701\10\C10

If Left(Bridge, j) = "-" Then
Bridge = Left(Bridge, j - 1) & "\" & Right(Bridge, Len(Bridge) - j)
End If

Next j
 
Help what?
Have you got a question?

Code:
Dim j As Integer 
Dim s As String

For j = 1 To Len(Bridge)
  If Mid(Bridge, j, 1) = "-" Then
    s = s & "\"
  Else
    s = s & Mid(Bridge, j, 1)
  End If 
Next j

Bridge = s
For Access 2k or higher, use:
Code:
Bridge = Replace(Bridge, "-", "\")
 
Sean,

Code:
Dim j As Integer 

j = Instr(1, Bridge, "A702")
If j > 0 then
   Bridge = Mid(Bridge, 1, j-1) & "A701" & Mid(Bridge, j+4)
End If

Or set the Help files for the Replace function.

Wayne
 
Well,

I got the first part of it, Bert got the last part of it. Great
teamwork Bert!.

Wayne
 
Great!! :D

I didn't see that there was a change in the number.
One of the effects of not asking a question?
 

Users who are viewing this thread

Back
Top Bottom