473,832 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_Contrac t.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 1399
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_Contrac t.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","Ta bleName","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(s trFolder 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_Contrac t.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","Ta bleName","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(s trFolder 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\AP P007.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_Contrac t.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","Ta bleName","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(s trFolder 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
10729
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 whatever they enter in the textbox. I have hardcoded ?St=Ok?City=Tyler but I need the info to come from the drop down list and textbox. Here is my code.. <%@Page Explicit="True" Language="VB" Debug="True" %>
2
6387
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 previous invoices for each client. The problem is that other workstations on the LAN cannot open the documents (they can connect to the database okay). The workstation on which the database resides (MainPC) opens the documents without a problem,...
4
5288
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 double-clicked? Is there anything I can do so that Access will open a hyperlink on a double-click? I find opening a hyperlink on a single click annoying. One reason I find it annoying is that I can't single click and then right click to edit/update...
1
3392
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 access 97 and the other one for microsoft acess 2000/2002). my problem is in a field with a hyperlink , which i selected in a table. this hyperlink refer to microsoft word documents on our intranet. i enter the hyperlink in a formular (right...
4
8958
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. I create the navigatURL from database dynamically. I see the same question mentioned here but the response is not souitable for me: http://www.dotnet247.com/247reference/msgs/11/57708.aspx
2
1787
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 states have a hyperlink. Once you click the hyperlink it will take the stateId from the click event and use the Get method to send it to the next page. Page 2 will simply use the browswer get method to show information based on that stateid. So my...
2
2617
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 columns is not databound and instead has up to three hyperlinks in it (Edit, Award, and Cancel). A couple of the hyperlinks should not be shown in certain cases. Now, mind you, I don't know if it's being done in the way that's best to do it. It...
9
2721
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= '<%# String.Format("Toyota/Images/Showroom/" & Container.DataItem("PathToDisplyPic"))%>' NavigateUrl='<%#
2
4293
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 just Qdescription with out hyperlink. <asp:hyperlinkcolumn headertext="Question" SortExpression="QDescription"
2
2107
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 "Display Text" of the hyperlink. I have 200 or so existing records - can this be done either with code or in a query? I'm not sure of the syntax to use to reference the "Display Text" property (if it can be done at all). Many thanks. Keith.
0
9795
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10499
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7753
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5624
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5789
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4421
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3972
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.