Nick67
asked on
MS Access convert a bitwise string into multiple rows
Ok,
I have data like so
JobID Long
ProvincialStamps Text(14)
ProvincialStamps is a string of 1's and 0's: "1100000000000" for example.
This is all very nice and I can do beautiful things like
If InStr(3, StampVal, "1") = "3" Then
'do some stuff when the third character is a 1
End if
and
Dim myboolean As Boolean
myboolean = False
If InStr(11, StampVal, "1") = "11" Then
myboolean = True
End If
If InStr(12, StampVal, "1") = "12" Then
myboolean = True
End If
If InStr(13, StampVal, "1") = "13" Then
myboolean = True
End If
If myboolean = True Then
'do some stuff if any of 11-13 are a 1
end if
but now, sadly, I have to drive a report with one record for each place in the ProvincialStamps string.
So that involves transforming that string into 14 records.
What's a nice way of doing that?
I have data like so
JobID Long
ProvincialStamps Text(14)
ProvincialStamps is a string of 1's and 0's: "1100000000000" for example.
This is all very nice and I can do beautiful things like
If InStr(3, StampVal, "1") = "3" Then
'do some stuff when the third character is a 1
End if
and
Dim myboolean As Boolean
myboolean = False
If InStr(11, StampVal, "1") = "11" Then
myboolean = True
End If
If InStr(12, StampVal, "1") = "12" Then
myboolean = True
End If
If InStr(13, StampVal, "1") = "13" Then
myboolean = True
End If
If myboolean = True Then
'do some stuff if any of 11-13 are a 1
end if
but now, sadly, I have to drive a report with one record for each place in the ProvincialStamps string.
So that involves transforming that string into 14 records.
What's a nice way of doing that?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Full details of the approach are in my comment.
Dale suggested what was needed
Dale suggested what was needed
ASKER
It wasn't abandoned as I had the last comment.
But no one else chimed in.
I'd accept Dale's comment as the answer, but there is now no UI to do so.
****Edit*****
F5 refresh made UI to accept previous comments available.
Now, clicking on any of them makes the bottom 'closing wizard pop up and then disappear.
****Edit****
A further refresh made the closing UI workable.