Forms :: Unable To Create Command Button To Open Folder On Desktop

Feb 19, 2015

I am simply trying to create a command button to open a folder on my desktop

Cannot seem to find this code

This is the path to the folder I want to open

C:UsersJONATHANDesktopCMS FILES

View Replies


ADVERTISEMENT

Modules & VBA :: Return Folder Directory To Text Box On Forms Record When Click Browse Command Button

Nov 12, 2014

I need to return a folders directory to a text box on my forms record called Files_Directory when i click the Browse command button... The folder will have more folders within it along with documents all relivant to the folder selected, hense the need for just the folder directory rather than a file.

View 12 Replies View Related

Forms :: Open A Specific PDF File Per Record With A Command Button

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

Forms :: Open Word Document Via Access Command Button

Feb 4, 2014

I am creating a database. I have all my forms, queries, tables, reports just as I need them. However, I would like to have a command button on my switchboard that will pull from a query to feed to a Word document (that's actually a letter on my company letterhead). I know a Macro has to be involved with this, but again, I have little to no knowledge of Macros. Also, I would like to be prompted to enter a client ID number when I click on this command button (because I only want to print a letter for a new client, not all of them).

View 4 Replies View Related

Forms :: Command Button To Open Datasheet Of Contact Names

Dec 5, 2013

I am trying to add a command button to my main menu to open the contact names as a datasheet, I have changed the properties on the contact names form to datasheet as well as changing the properties on the button to the below:

Private Sub Command48_Click()
DoCmd.OpenForm "Contact Names", acFormDS
End Sub

at first after I saved it, the button did nothing. Now after a bit of playing around (probably not a good idea) I have a new message that states:"The expression On Click you entered as the event property setting produced the following error: Ambiguous name detected: Contacts_Click.To add some additional information, in the vba sheet above the code i wrote above it says:

Option Compare Database
Private Sub Contacts_Click()
DoCmd.OpenForm "Contact Names", acFormDS
End Sub

Private Sub Contacts_Click()
DoCmd.OpenForm "Contact Names", acFormDS
End Sub

should I delete this?

View 5 Replies View Related

Forms :: Create A Button To Open A Form To Show Specific Records

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

Modules & VBA :: How To Access A Folder On Desktop

Feb 7, 2014

I used to have a code that we used to copy data from a folder that was on the desktop using the code below.

Code:
DoCmd.CopyObject "C:Documents and SettingsAll UsersDesktopWetcleans

This does not work with windows7. I have tried the C:USERSPUBLICDESSKTOPWetcleans but that does not seem to work either. How to access a folder on the desktop ?

View 2 Replies View Related

Forms :: Button To Go To Desktop From Form - Runtime Error 490

Mar 7, 2015

I was trying from a button on my form that will go to and bring up the desktop. I want it so I can put this database on anyone's computer and the button will work.

I am using this and it works but only on my computer.

Application.FollowHyperlink "C:UsersBryanDesktop"

I also tried this

Application.FollowHyperlink "C:Show Desktop.scf"
And
Application.FollowHyperlink "C:WINDOWSSystemShow Desktop.scf"

Both gives Runtime error 490 cannot open specified file.

View 14 Replies View Related

Forms :: Continuous Form With Command Button On Each Record To Open Another Form

Jul 30, 2014

I have a continuous form in which I put a command button for each record called "detail". I would like to click on the "detail" button and make it open another form containing all (and only) the info on this record.

At first I refused to use an "id" to link both forms, but finally I added the "id" in the table... however still does not work.

continuous form: "04 - GASTOS_BUSQUEDA"
id field on continuous form: "Gastid"

pop-up (details) form: "GASTOS_EDITAR"
id on pop-up (details) form: "editar_id"

This is what I have tried on the "click" properties of the "details" button field (called "btn_editgs"):

1)
DoCmd.OpenForm "GASTOS_EDITAR", acNormal, , "[editar_id] = " & Me.Gastid

2)
DoCmd.OpenForm "GASTOS_EDITAR", , , "[editar_id]=" & Me.Gastid

3)
stLinkCriteria = "[editar_id]=" & Me![Gastid]
DoCmd.OpenForm "GASTOS_EDITAR", , , stLinkCriteria

4)
Private Sub btn_editgs_Click()
On Error GoTo btn_editgs_Click_Err
Dim strWhere As String
strWhere = "[editar_id] = " & Me.Gastid
DoCmd.OpenForm "GASTOS_EDITAR", , , strWhere
btn_editgs_Click_Exit:
Exit Sub
btn_editgs_Click_Err:
MsgBox Error$
Resume btn_editgs_Click_Exit
End Sub

View 9 Replies View Related

Forms :: Open A Form For Saving Results Of Query To A Text File On Desktop

May 6, 2015

I have a BE database, that when opened, opens a form for saving the results of a query to a text file on the desktop. It works fine, if the full path is entered.

The problem is, I want this saved on any users' desktop. I did some digging and found the %userprofile% variable, which when used, gives me the error.

I understand this should work in both Windows XP and Windows 7, which are the environments the full DB will operate in. So far the "EXPORT" button on the form has the following for the code:

Code:
Private Sub BTN_Export_Click()
DoCmd.TransferText acExportDelim, , "QRY_ExportPublicComment", "C:UsersMark N. McAllisterDesktopPubComExp.txt"
End Sub

When I tried this:

Code:
Private Sub BTN_Export_Click()
Dim strPath As String
strPath ="%userprofile%desktopPubComExp.txt"
DoCmd.TransferText acExportDelim, , "QRY_ExportPublicComment", strPath
End Sub

the error occurs.

View 10 Replies View Related

Modules & VBA :: Search For All Picture Files In Documents And Copy To A Folder On Desktop

Mar 28, 2014

I've been trying to search for all picture files in my documents and copy them to a folder on the desktop. I found this and it work great for searching however I'm having trouble getting the copy to work. [URL] ....

Code:
Dim colFiles As New Collection
RecursiveDir colFiles, "C:Photos", "*.jpg", True
Dim vFile As Variant
For Each vFile In colFiles
Debug.Print vFile
Next vFile

Code:

I replaced the debug.print vfile with my copy function. I've tried copyfile but it needs to specify the destination with the file name. I tried using the FSO filecopy method and can't get it to work (keep getting a compile error "Expected =") I feel the hard part is done and this part should be simple.

View 3 Replies View Related

Command Button Open Image

Jan 29, 2005

Is it possible to have a cmdButton open a pre saved image from your hard drive. The images are saved with the same name as the Account Number. (ex: AcctNum -- TA123409 Image -- TA123409.bmp) I want the cmdButton to open the image filtered or based on the Account Number. If so, could someone show me a sample OnClick code. Thanks

View 7 Replies View Related

Command Button To Open Web Page.

Oct 26, 2004

Hello,

I would like to make a comand button in my form that will open a specific web page.
Can some one Help Me Please?

View 12 Replies View Related

Command Button To Open A PDF Form.

Apr 7, 2008

Dear All:

Does anyone know how to use a command button to open a Pdf form in access?

This Pdf form is on the "c" drive called "portfolio".

Thanking in advance,

Dion

View 14 Replies View Related

Using Command Button To Open Table

Aug 26, 2005

Dear All:

I would like to use a command button on a form to open a table. The name of the table is called "MAJORCODE"

Any suggestions?

Many thanks,

Dion

View 5 Replies View Related

Open New Form Command Button

Oct 11, 2006

I have a form with a drop down list that is coming from a query (City Query)

I have a command button to open a form for data entry to the City table -

When I open the form for city add a record - close the form.

I then go to the drop down list (city query) to select the record that was just added to the city table and the record is not in the query.

What do I need to do for the newly added record to show in the query drop down?

View 14 Replies View Related

Command Button To Open Attachments

Jun 18, 2012

I have created A command button (OK) on the form but can't figure out the code. My Scenario is:

1) I have 2 cascading combo boxes
2) I have a text field as attachment

What I want is to select the value from second combo box then I want to click command button to view the attachments instead of double clicking the attachment and also I wanna ask is there any way to modify the display view of attachments in access a part from paperclip and image icon.

View 1 Replies View Related

Way To Create A New Record By Clicking A Command Button

Mar 13, 2012

Is there a way to create a new record by clicking a command button but to show the same text boxes shown in the attachment in the next record.

View 1 Replies View Related

How To Open A Dialog Box To Move Files Inside A Folder That Is Setup As Current Folder

Sep 2, 2015

I'm trying to automate a process of selecting a set of file/s and move them in a folder. When I click on a button, it should open a current folder that is setup in the code.

Lets say that I have a folder C:documents est, and very time I click on the button, it should open the dialog box with that path so I can select the files from another folder, drag them there and they will be saved in that folder.

This will form part of wider automation that will send an email stating that those file/s where placed in that folder.

I have in the same form where the button is placed, 3 check boxes that needs to be passed to the email as well that one or all the files where placed in the folder.

View 10 Replies View Related

Command Button In Form To Open Certain Files

Mar 12, 2005

I have based a form on a parameter query, so that when the user is prompted to enter a 'Hobby' to search on, the relevant records will be displayed on the form.

Now, I have created a command button designed to open a template letter in MS Word for a particular hobby. The problem is, I need the command to open certain file depending upon the value input in the parameter box intially. How would I go about doing this?

View 1 Replies View Related

Creating A Command Button To Open A File

Jun 13, 2006

I have set up a database that houses file locations. The form that I have made shows a job # and the files that correlate with it. I would like to set up a command button that will read the file name and open it in Excell. If any one know how to do this I would greatly appreciate the help.

View 3 Replies View Related

Open And Excel File W/ Command Button?

Nov 3, 2006

I am trying to open a workbook with a command button on a form however the path to the file is giving me a fit. The path for the file location contains spaces and I am going blind trying to figure out how to rectify the path. Heres the line. I am sure someone here will see this problem quick! Thanks.

Private Sub Command0_Click()
On Error GoTo Err_Command0_Click

Dim stAppName As String

stAppName = "Excel.exe N:OPSCOMMONOpsResearchContact CenterDI CCL Reporting dBApps by Agent.xls"
Call Shell(stAppName, 1)

Exit_Command0_Click:
Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click

End Sub

Heres the mess I made out of it:
stAppName = "Excel.exe N:OPSCOMMONOpsResearchContact" & Chr(32) & "CenterDI" & Chr(32) & "CCL" & Chr(32) & "Reporting" & Chr(32) & "dBApps" & Chr(32) & "by" & Chr(32) & "Agent.xls"""

:confused:

View 6 Replies View Related

Command Button To Open Excel File

Nov 15, 2006

Is this possible? A command button when click will open an excel file... :rolleyes:

Cheers!
Sheila

View 5 Replies View Related

Command Button To Open Specific Record

Oct 6, 2004

Hi All,

I have a form called "frmProducts" which is linking to table "tblproducts".

Easy Enough...

The form shows all the Products information (fields).
I have a "More Info" command button (cmdMoreInfo) next to every record in the form.

When the command button is clicked I would like it to open up another form "frmMoreInfo".
But On frmMoreInfo I would only like it to show that specific product.

I have tried the following code on the on click event on the command button but it was always asking me for the value of Form![frmMoreInfo]![txtInternalCode]

Code:Private Sub Command12_Click()On Error GoTo Err_Command12_ClickDim stDocName As StringDim stLinkCriteria As StringstDocName = "frmMoreInfo" stLinkCriteria = "Form![frmMoreInfo]![txtInternalCode]=" & Me![txtInternalCode]DoCmd.OpenForm stDocName, , , stLinkCriteriaExit_Command12_Click:Exit SubErr_Command12_Click:MsgBox Err.DescriptionResume Exit_Command12_Click End Sub

Any Ideas?

View 4 Replies View Related

Command Button Open Up Hyperlink From A Recordset

Jan 3, 2005

Hello all, I hope your hollidays were great!!

Ok I have a Continuous form that in one of it's fields contains Hyperlinks. The form is named [Song Info] and the field is [Play].
I want this field to be hidden and have a command button open up the hyperlink in that recordset. I think that all the info need
but if not let me know.



Thanks
Rich M

View 11 Replies View Related

Open An Excel Workbook From A Command Button

Jun 17, 2005

I have a button on a form, to open Excel, I need to open the relevant file at the same time...


Dim oApp As Object

Set oApp = CreateObject("Excel.Application")
oApp.Visible = True


My file is located...C:ship info imeline.xls

any ideas please...

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved