On my form, I have a different proposal number for each record. The name of the field is
Prop#.
The name of the CONTROL on the form should not have the hash mark. Maybe name the control "Prop"
Using Micron's pseudo code, I came up with this:
Code:
Private Sub Prop_DblClick(Cancel As Integer)
Dim vProp As Long
Dim LB As Long
Dim UB As Long
Dim ZeroReq As Integer
Dim DivNum As Long
Dim NumZero, i
Dim PropMod As Long
Dim HyperPath As String
vProp = Me.Prop '<< Me.Prop is the control name, not the field name ("Prop#")
ZeroReq = Len(vProp) - 1
NumZero = 1
For i = 1 To ZeroReq
NumZero = NumZero & "0"
Next
DivNum = CInt(NumZero)
PropMod = vProp Mod DivNum
LB = vProp - PropMod
UB = LB + DivNum - 1
HyperPath = "\\server\folder1\folder2\" & LB & "-" & UB & "\" & vProp
MsgBox HyperPath 'you know what to do from here
End Sub