473,396 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

hyperlink question

I am currently generating a hyperlink to a file located at the
following directory G:\Call Center\APP\APP_2006\APP*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 accoun

G:\Call Center\APP\APP_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
that changes 1 number every 999 records and then the file name entered
in on the original for will change back to 1 and start over. Currently
this is the code that I am using
Private Sub File_Scan_Name_GotFocus()
Scanned_Contract.Text = "G:\Call Center\APP\APP_2006\APP" &
Left(File_Scan_Name.Value, 1) & "001\APP" & Right("0000" &
File_Scan_Name.Value, 3) & ".tif"
End Sub

Can someone help me out with this there has got to be an easier way.

Thank you -
Turf

Sep 7 '06 #1
3 1388
tu*****@aol.com wrote:
I am currently generating a hyperlink to a file located at the
following directory G:\Call Center\APP\APP_2006\APP*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 accoun

G:\Call Center\APP\APP_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
that changes 1 number every 999 records and then the file name entered
in on the original for will change back to 1 and start over. Currently
this is the code that I am using
Private Sub File_Scan_Name_GotFocus()
Scanned_Contract.Text = "G:\Call Center\APP\APP_2006\APP" &
Left(File_Scan_Name.Value, 1) & "001\APP" & Right("0000" &
File_Scan_Name.Value, 3) & ".tif"
End Sub

Can someone help me out with this there has got to be an easier way.

Thank you -
Turf
If the year is 2007, and 1050 docs have been created in 2007, the folder
string will be
G:\Call Center\APP\APP_2007\APP*002\

The following code will ensure the folder exists. It creates the folder
name. All you need to do is concatenate the folder name with the
filename to do a FileCopy.

Dim strFolder As String
Dim lngCnt As Long

'get the number of documents entered this year
'change the field/table names to match your table structure)
lngCount = Dcount("ID","TableName","Year([DateEntered] = " & Year(date()))

'now divide by 999 and add 1 to get folder # in 999 increments
lngCount = (lngCount \ 999) + 1

'now create the folder name string
strFolder = "G:\Call Center\APP\APP_" & Year(date()) & _
"\APP*" & lngCount & "\"
MakeDirFolder strFolder
Private Sub MakeDirFolder(strFolder As String)
'this routine finds each folder in the path,
'starting at the root, and ensures each folder exists
Dim intFor As Integer
Dim strF As String
Dim strChar As String
Dim strTest As String
Dim strFolder1 As String
For intFor = 1 To Len(strFolder)
strChar = Mid(strFolder, intFor, 1)
strF = strF & strChar
If strChar = "\" Then
strTest = DIr(strF, vbDirectory)
If strTest = "" Then MkDir (strF)
End If
Next
End Sub
Sep 7 '06 #2
Way cool - I will check this out and see how it works.

Thank you

salad wrote:
tu*****@aol.com wrote:
I am currently generating a hyperlink to a file located at the
following directory G:\Call Center\APP\APP_2006\APP*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 accoun

G:\Call Center\APP\APP_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
that changes 1 number every 999 records and then the file name entered
in on the original for will change back to 1 and start over. Currently
this is the code that I am using
Private Sub File_Scan_Name_GotFocus()
Scanned_Contract.Text = "G:\Call Center\APP\APP_2006\APP" &
Left(File_Scan_Name.Value, 1) & "001\APP" & Right("0000" &
File_Scan_Name.Value, 3) & ".tif"
End Sub

Can someone help me out with this there has got to be an easier way.

Thank you -
Turf

If the year is 2007, and 1050 docs have been created in 2007, the folder
string will be
G:\Call Center\APP\APP_2007\APP*002\

The following code will ensure the folder exists. It creates the folder
name. All you need to do is concatenate the folder name with the
filename to do a FileCopy.

Dim strFolder As String
Dim lngCnt As Long

'get the number of documents entered this year
'change the field/table names to match your table structure)
lngCount = Dcount("ID","TableName","Year([DateEntered] = " & Year(date()))

'now divide by 999 and add 1 to get folder # in 999 increments
lngCount = (lngCount \ 999) + 1

'now create the folder name string
strFolder = "G:\Call Center\APP\APP_" & Year(date()) & _
"\APP*" & lngCount & "\"
MakeDirFolder strFolder
Private Sub MakeDirFolder(strFolder As String)
'this routine finds each folder in the path,
'starting at the root, and ensures each folder exists
Dim intFor As Integer
Dim strF As String
Dim strChar As String
Dim strTest As String
Dim strFolder1 As String
For intFor = 1 To Len(strFolder)
strChar = Mid(strFolder, intFor, 1)
strF = strF & strChar
If strChar = "\" Then
strTest = DIr(strF, vbDirectory)
If strTest = "" Then MkDir (strF)
End If
Next
End Sub
Sep 14 '06 #3
Ok well I could not get to work - I think I may be going through an
access brain freeze.

I dont know if this matters but the only reference to the scanned
documents that are being kept on a shared server is a number file name
number that becomes part of the hyperlink
so the link below has the file name of 7
G:\Call Center\APP\APP_2006\APP0001\APP007.tif

tu*****@aol.com wrote:
Way cool - I will check this out and see how it works.

Thank you

salad wrote:
tu*****@aol.com wrote:
I am currently generating a hyperlink to a file located at the
following directory G:\Call Center\APP\APP_2006\APP*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 accoun
>
G:\Call Center\APP\APP_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
that changes 1 number every 999 records and then the file name entered
in on the original for will change back to 1 and start over. Currently
this is the code that I am using
>
>
Private Sub File_Scan_Name_GotFocus()
Scanned_Contract.Text = "G:\Call Center\APP\APP_2006\APP" &
Left(File_Scan_Name.Value, 1) & "001\APP" & Right("0000" &
File_Scan_Name.Value, 3) & ".tif"
End Sub
>
Can someone help me out with this there has got to be an easier way.
>
Thank you -
Turf
>
If the year is 2007, and 1050 docs have been created in 2007, the folder
string will be
G:\Call Center\APP\APP_2007\APP*002\

The following code will ensure the folder exists. It creates the folder
name. All you need to do is concatenate the folder name with the
filename to do a FileCopy.

Dim strFolder As String
Dim lngCnt As Long

'get the number of documents entered this year
'change the field/table names to match your table structure)
lngCount = Dcount("ID","TableName","Year([DateEntered] = " & Year(date()))

'now divide by 999 and add 1 to get folder # in 999 increments
lngCount = (lngCount \ 999) + 1

'now create the folder name string
strFolder = "G:\Call Center\APP\APP_" & Year(date()) & _
"\APP*" & lngCount & "\"
MakeDirFolder strFolder
Private Sub MakeDirFolder(strFolder As String)
'this routine finds each folder in the path,
'starting at the root, and ensures each folder exists
Dim intFor As Integer
Dim strF As String
Dim strChar As String
Dim strTest As String
Dim strFolder1 As String
For intFor = 1 To Len(strFolder)
strChar = Mid(strFolder, intFor, 1)
strF = strF & strChar
If strChar = "\" Then
strTest = DIr(strF, vbDirectory)
If strTest = "" Then MkDir (strF)
End If
Next
End Sub
Sep 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rob Rogers | last post by:
I am old programmer, but this asp.net stuff throws me for a loop. I have an asp.net page that I need to create a dynamic hyperlink from based on the user selection from the drop down list and...
2
by: deko | last post by:
I have a subform in my Access 2002 mdb that holds Hyperlinks to documents (.pdfs) that are associated with each record in the database. The datasheet subform is simply a list of Hyperlinks to...
4
by: Salad | last post by:
If I create a field as a hyperlink, Access will open the hyperlink if I single click it. Is there a method within the operating system that would tell access to only open the hyperlink if...
1
by: Badboy36 | last post by:
Hello user from googlegroups, i made a microsoft access database with front and backend. i created the backend in microsoft access97. for the frontend i made two versions (one for microsoft...
4
by: Amir Eshterayeh | last post by:
Dear Friends My asp hyperlink goes to relative address instead of absolute. I like navigate url goes to outsite link like www.asp.net but now, it goes to www.mysite/www.asp.net please help....
2
by: Big E | last post by:
I'm using ASP.Net and SQL Server. I have a table called states. I have 2 forms. On form 1 is the 50 states in textboxes created with a loop. I want to have those 50 or 45 or whatever amount of...
2
by: BobRoyAce | last post by:
I am brand new to ASP.NET and am now required to take over maintenance of a ..NET/C# web application. On one of the pages I'm working on there is a DataGrid which has multiple columns. One of the...
9
by: Leon | last post by:
What Am I Doing Wrong? Code Will Not Run, I Can't See The Error! Thanks. <asp:datalist id="DataList1" runat="server" RepeatColumns="4"> <ItemTemplate> <asp:HyperLink id=HyperLink1 ImageUrl=...
2
by: Kumar | last post by:
Hi Folks, I have a question regarding conditional hyperlink in datagrid of asp.net ,c# application I want to display Hyperlink if my QID values in (1,4,5,6) other wise i want to display...
2
by: Keith Wilby | last post by:
I have a personnel database with a hyperlink field which contains the path to a mugshot. I was thinking of combining the hyperlink field with the surname field by putting the surname in the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.