Generate hyperlink based on number entered on form

C

Chris Overturf

I am currently creating a database. What im having problems with is I have a

field that the user will enter a number of a previously scanned document that
is saved on our network share drive (G Drive) when i loose focus I would like
to create the
hyperlink in the second field. Now for the problem. I cannot create the
correct hyperlink.

I am currently generating a hyperlink to a file located at the
following directory G:Call CenterAPPAPP_2006APP*001 based on a
numberical value that in entered in on a form.

The problem im encountering is that the network directory that im generating
the
link from has several changing variables that need to be
taken into account


G:Call CenterAPPAPP_2006/APP*001 - the year 2006 changes every year. So
come
the year 2007 the link needs to change to that.


In addition the APP*001 - The * (astrick) represents a numberical value
(starting at zero) that changes 1 number every 999 records (First folder
would be 0001; second
folder would be APP1001 and so on) Each time the folder name changes (APP0001
to
APP1001) the file name entered in on the original for will change back to 1
and
start over. The last 3 digets in the APP*001 sequence entered above is the
number the user will be entering that represents the scanned file name.
Currently this is the code that I am using


Private Sub File_Scan_Name_GotFocus()
Scanned_Contract.Text = "G:Call CenterAPPAPP_2006APP" &
Left(File_Scan_Name.Value, 1) & "001APP" & Right("0000" &
File_Scan_Name.Value, 3) & ".tif"
End Sub

I know this is not correct and have drawn a blank on how to actually work
this
problem. Can someone help me out with this there has got to be an easier way
 
Top