Modules & VBA :: Create Some Code For Button In A Report That Will Follow A Hyperlink To Specific File
Sep 9, 2013
I am trying to create some code for a button in a report that will follow a hyperlink to a specific file. The problem I'm having is that the files that are at the end of the hyperlink can have various extensions (*.doc, *.docx, *.pdf, etc.) I'd like to be able to put a wildcard in the code to allow the opening of the file regardless of the extension.
Code so far:
Private Sub Command6_Click()
Application.FollowHyperlink ("C:UsersjbeggDocumentsAccessTestFolder" & [FileName] & ".*")
End Sub
View Replies
ADVERTISEMENT
Jun 2, 2015
I want to create a Macro saves the report in a specific location, and uses two fields within the report to generate the name of the file. For example, "[Sales Rep Name] + [PayPeriod].pdf" and it should be saved in a predetermined folder.
View 1 Replies
View Related
Jun 23, 2013
I am trying to use followhyperlink as a way to open a link in a browser to a file in a shared dropbox folder. I have a form with a control, the control is named LinkToDoc it's record source is a text field in a table. The file path in the table is similar to [URL] ..... I am getting run time error 15, cannot open the specified file.
Code:
Private Sub cmdOpenFile_Click()
Application.FollowHyperlink LinktoDoc
End Sub
View 3 Replies
View Related
Sep 6, 2012
Is it possible to follow a hyperlink to a file without using a file extension?
I have links being created based on the name of a file, but because I haven't used a file extension it crashes.
I know I can give the user a choice of what the file extension is and add it to the hyperlink, but it's an extra step, and another place for someone to make a mistake.
I'm potentially using 3 different file types, Word, Excel and PDF's.
The hyperlink works if I just reference a drive/folder, or if I add the file extension.
View 3 Replies
View Related
Nov 3, 2006
Hi
Please help me,
I have the form, in this form there is list of value which run query and resulting the report. For example if I have 5 item in list, i have to choose one of then and the query running and the report is print preview.
My question is,
How to export all 5 report to 5 sheet in one excel file.
I know may be the problem in format if I send to excel, but I will fix it in the excel. The most important is, I export the report to excel, each of the report in each of sheet of excel.
Thanks in advance
sorry my english is not good.
View 2 Replies
View Related
Dec 4, 2006
A have a table with many records and each record has a hyperlink to a document. Based on some criteria i want to attach the hyperlink file to an email. Don't want to have to do this manually. Is there anyway i can write code to go and get the hyperlink file and then attach the physical file into the email? This could result in 1 file being attached, 13 files being attached, 0 files etc.
Any help would be greatly appreciated.
Cheers,
Combsie.
View 5 Replies
View Related
Nov 16, 2004
I have a main filing table and three look up tables (file cabinet, topic, and subtopic). In the three look up tables I have created short codes to identify the name of the field.
I want to create a main filing code that takes the codes from each lookup table and combines it into one field. If the location of the file changed I would need the code to change.
Example file cabinet location Rod 1 is R1, Accounting is AP; file topic Active Jobs is ACTJOB, Bank Transactions is BANKTR; subtopic Northeast Fire Station is NETCFS. For the file for the fire station the code would read R1ACTJOBNETCFS.
The form is set up as a cascading combo.
The only purpose for this field is to allow me to do a mail merge to create labels so that I can re-file folders easier without having to go into the database and look up the locations.
I don't know if I should create the expression in the form or if I should do something in the table field.
Suggestions?
View 1 Replies
View Related
Jan 6, 2014
Im developing a database for work, I would like to provide a link on a form to run an external program. The form is call frmProfile. The table is called tblProfile and the hyperlink field is called link.
I would like a diaglog box to appear where the user can browse for the file and select it. Ive found various scripts but with my vb skills being very basic its no wonder im getting no joy.
I should add... each record has its own associated file. Its cctv footage which runs from the cctv systems own proprietary software. So its an individual filefor each record not just a program.
View 1 Replies
View Related
Jan 17, 2014
I am trying to create a button that opens up a webpage. I get how to create a hyperlink on a button. The problem is, I need to open a specific page depending on the information in a text box.
The text box displays the tracking number for the current record. That number is populated automatically via a control source. The problem is that I need to open different web pages depending on the tracking number displayed. For example, UPS has a specific start to their number (1ZX....). Other trucking companies have a specific format, also.
So how do I tell it to look at the tracking number and then open the corresponding web page?
View 2 Replies
View Related
Mar 4, 2014
I have a main form [Job Quote Form 10-2205] and I am trying to add a command button to open up [Job Process Form-MKD] and have the [Job Process Form-MKD] open up and only show the records that match a certain field, in this case what I call "JobTrackNo" in the [Job Process Form-MKD]. (see attached .jpg)
This problem started to happen only recently, namely you will see that the left column under [Job Quote Form 10-2205] is blank, where normally there had been a number of fields to choose from. The fields are all still available, they are just not opening when I try to match two fields.
View 2 Replies
View Related
Mar 19, 2012
I haven't used access before and have been set the task to create a data of photos. The table is called 'Find a Photo' and contains 6 catergories of various information including river, site and date. I would like to create a search/command button by which i can type the river, site and date into seperate text boxes and search all of them at the same time.I don't know how to connect a command button to command button and not sure if any macros/queries are needed. Hope all this aint to hard to do.
View 1 Replies
View Related
Nov 19, 2013
I am using MS Access 2010. I have a code that I am using that loops through a folder gather all the names of the files in the folder and inserts them into a table (shown below). The table is named "tblFiles" there are two columns in the table titled file name and file path. What I want to do is to also loop through the same folder to find the file path of the files and insert them into the file path column has a hyperlink where users can just click on the hyperlink and the file opens.
Private Sub Form_Load()
Dim fs, f, f1, fc, s
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("tblFiles")
[Code] .....
View 4 Replies
View Related
Jul 7, 2006
I have a report with grouping on a code - I would like to do a page break on the second code - I don't know where to start on this.
View 1 Replies
View Related
Aug 24, 2007
Does anyone know the code for opening a specific notepad file from a button? I know there's a default button but it only opens a blank notepad page. I need to open some written instructions from a button you see.
Thanks.
View 3 Replies
View Related
May 15, 2015
I have created an action log database that sends an email when a new action is entered. I would like to launch the database using a hyperlink in the email, but can't seem to get it to work. All users have a copy of the front end on their desktop, so whatever I add to the email needs to launch the front end for any user signed on to their own desktop.
This is what I have and it sends a hyperlink but I click it, I get an error saying it can't find the file. I don't know how to word the path name for any user?
With obMsg
.subject = "New action request for " & team
.To = people
[Code].....
View 14 Replies
View Related
Apr 18, 2013
I need to open a specific pdf file per record by using a command button. The pdf files will all reside in a specific folder in a partition on my hard drive. Each pdf file will have a unique four digit file name e.g 1234.pdf.The file name will match a unique number allocated to each record. This number is generated by adding 1000 to the record ID.Record 10 will therefore have an associated pdf file name of 1010.pdf.I have created a text box field , named 'TestReportID', to capture the unique four digit number per record that I assume is needed to be referred to when setting up the code to find and display the correct related pdf file.
I have set up a command button on the records form and as simple test using the hyperlink address to the folder where the pdf files reside, I can open a pdf file by clicking on the command button but it does not matter what record is open when I click the command button, it will always open the same pdf file.If I don't identify a specific file name in the hyperlink address, when I click on the button it will display a file open dialog which lists all the relevant pdf files and I can then select and open the required file.I would like to cut out that step and get the correct file to open when I click the button.
View 2 Replies
View Related
Jul 23, 2013
I want to hyperlink from a query direct to the relevant record in a specific form. I have a hyperlink field in the form which shows up in the query. When clicked in the query, this hyperlinks to the form but I cannot make it select the correct record in the form.How do I get it to select the correct record?
View 3 Replies
View Related
Jan 11, 2015
I would like to create a form that allows me to search for a folder on my desk top, then once located i can transfer that file to a specific location on another drive, Similar to the Browse / upload function you see on many applications.I am using Access 2003. Is this possible??
View 5 Replies
View Related
May 12, 2005
DoCmd.OutputTo acOutputReport, "MD Form",".xls" "C:Documents and SettingsKevanAlderton.THERMOSHIELDDesktop", True
any ideas what is wrong ??
many thanks
View 3 Replies
View Related
Jul 17, 2013
An if statement which will disable out a field depending on which type of field is selected from a separate lookup.I know that is confusing, so let me explain with an example. If I have a lookup field connected to "Vegetables", "Fruits" and "Nuts". If the user selects a "Vegetable" from the lookup field, I need another field disabled, for example sake, "What fruit did you buy?". If the user selected a "Fruit" from the lookup, "What fruit did you buy?" would be enabled.
I know how to enable and disable fields, but it is the If Statement. How would you specify an If statement to specifically look at which category of a lookup is selected?The lookup is not static. So going with our example, the user can add more fruits, vegetables, and nuts as desired, so simply specifying the IDs for the available options will not work. The If statement needs to encompass the category.
View 4 Replies
View Related
Sep 4, 2014
I am using a datasheet view with dbl click code to open a form to a selected record. I was able to use pbaldy's code and it worked perfectly.
DoCmd.OpenForm "Asset Status", , , "[Project Number] = '" & Me.Project_Number & " ' "
Then I realized I really want to be able to go to other records after I have gone to this form and tried this:
Dim rs As Object
Dim lngBookmark As Long
'set variable to the current record
lngBookmark = Me.Project_Number
'open new form
[code]....
But to no avail. Project_Number is a text field.
View 12 Replies
View Related
Jul 14, 2015
I'm currently working on a project within access which will allow users to select/input information in a form which will then save to the database.
What I need is to create a button on the form which will allow you to convert the data collected from the form to a custom text file template.
(Or maybe the last row added to the database. - although this may cause errors. Example: the form information doesn't save which will in turn create a text file with the data collected from the previous job)
The custom text file template should have a sentence description followed by the value recorded from the form.
Example:
1 configuration type: (data from form)
2 model type: (data from form)
3 Poc: (data from form)
And so on.
So in summary - I would be to use the form to collect the desired information which will save to the database.
Once actioned, a custom text file should be populated with the collected information (with specific data placement as per the example above)....
View 1 Replies
View Related
Sep 6, 2013
I am trying the get specific data out of an XML file. I managed to access a nodelist but I need more data.
This is the XML file:
Code:
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02" xmlns:xsi="removed due to #posts">
<CstmrDrctDbtInitn>
<GrpHdr>
<MsgId>006-2012-11-09-12:21:47</MsgId>
<CreDtTm>2012-10-12T12:21:47</CreDtTm>
[Code] ....
This is the code to start with:
Private Sub NameSpace_Click()
Dim strFile As String
Dim xDoc As DOMDocument
Set xDoc = New DOMDocument
Dim Nodes As IXMLDOMNodeList
Dim xNode As IXMLDOMNode
[Code] ....
The extra data I need are the IBAN and Ustrd field. But they are on a different level in the XML.
I tried selectSingleNode but no solution yet.
View 1 Replies
View Related
May 29, 2014
i have thousands of data records with hyperlinks that are correct. Each data record shows the actual link (google.com, foxnews.com, espn.com, etc.). However, i want to change all of the records to just say "link" instead of saying espn.com, etc. How can i do this automatically without having to manually right click, edit, and changing the text to display?
View 6 Replies
View Related
Dec 4, 2013
I want to extract specific data from a text file and place it in my table.The following is an example of the data:
Display Author="All Saints" Title="On & On" Genre="Pop" Color="7693971" Tag="2"
I want to extract the following:
Where the word Author= appears to extract the data between the double quotes, so in the above case I want to extract "All Saints" excluding the double quotes.And then where Title= appears extract "On & On", again excluding the double quotes.So I would end up with data in my table looking something like this
strArtist [Author] strSong [Title] strGenre [Genre] strYear [Year]
All Saints On & On Pop
America Venture Highway Rock 1972
Amillionsons Misty Blue Pop 2002
my table is name tblMusicList, the fields are:
strArtist
strSong
strGenre
strYear
View 4 Replies
View Related
Nov 6, 2014
I am trying to create a button on an access form that will prompt the user to enter a search month and then export to excel all records in that database that match that month.
So, if the user prompt "what month" is October, then THE 30 records in the field [receivedate] that are in october (10/XX/XXXX) are exported to excel.
View 7 Replies
View Related