troubleshooting Question

Access 2007, Truncate a number

Avatar of Amour22015
Amour22015 asked on
Microsoft AccessVisual Basic ClassicVB Script
13 Comments1 Solution756 ViewsLast Modified:
Thank you all!

I have this code:
Set rsSCGTable = New ADODB.Recordset
sSQLOLDSCGTable = "Select * from SCGOldNumTable where SCGID = '" & CboSCG & "'"
rsOLDSCGTable.Open sSQLOLDSCGTable, CurrentProject.Connection
If Not rsOLDSCGTable.EOF Then
'Check if unclassified
    If rsOLDSCGTable!Class <> "U" Then
        MsgBox "This is not a Unclassified Document"
        GoTo BeforeExit

        Path1 = CurrentProject.Path
        Path2 = "\Approved\"
        StrPath = Path1 & Path2
        ' Open the Matching PDF
        Application.FollowHyperlink StrPath & Me.CboSCG.Column(0) & ".pdf"
    End If
End If

I need the number to truncate if it does not find the cboSCG number
cboSCG number is: 01-0001.00
But the PDF number is: 01-0001.01

Truncate to: 01-0001 and come up with message that:
"Found another referance number do you want to open it" Y/N
If "Y" then
open PDF
end If

Get vaccinated; Social distance; Wear a mask
Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros