I have a order database and i receive invoices from suppliers and there are different users updating the records. I want to save the invoices in shared folder so all of the users can view/access the invoices.
I have some code that attaches any files that are in my attachment field on the current record in to a email this is great but I m starting to realise that this is take up way to much space as it hold a copy in the database and can t afford to go down the sql sever route so what I have done is added some new fields called path1, path2 ,path3 ,path4 and path5 now the user can add the files location to these text box instead of add them via the attachment field also I can now limit number attachments to each record
Code: Private Sub cmdEmail2_Click() Dim appOutLook As Outlook.Application Dim MailOutLook As Outlook.MailItem Dim OutlookAttach As Outlook.Attachment Set appOutLook = CreateObject("Outlook.Application")
[Code] ....
Some how I need to change this so it checks fields path1 path2 path3 path4 path5 on the current record and see if anything is entered in these textbox's and follow the paths and attach the files to email
How to make command button . How to add a file path to a text box
1. add new field to your table e.g "path1" 2. add the new field to your form 3 create new command button call it addpath 4 add code below to click on event
Code: Private Sub addpath_Click() Dim fDialog As Office.FileDialog Dim varFile As Variant ' Clear listbox contents. ' Me.Path1.Value = "" ' Set up the File Dialog. '
[Code] ....
This will now save file location path to the path1 text box. To open file path
1.add another command button call it "pathopen" 2. add code below on click event
Code: Private Sub pathopen_Click() Application.FollowHyperlink Me.Path1 End Sub
How to add attachments to a email using a sub form were I store the attachment paths
E.g I have a main form called frmteaminfomer with various fields and continuous subform called attachmentssubform in the sub form I have a field call txtaddress . I have some code that I can pick a file then put its file path into txtaddress field and also have a check box call add to email. so what I trying to do is loop through all the records in the subform and if the check box is true add the files as attachment on the email.
After some help from one of the threads here I managed to install a Browse button in a form that inserts a file path to a text box. What I need is the folder path from that file path in another text box. For example if the file path is C:Documents and SettingsmixupSketchesowl.jpg
I would like to get either C:Documents and SettingsmixupSketches Or, C:Documents and SettingsmixupSketches in my second text box.
I do not have much experience with Access; therefore please give a little detail on how to accomplish this.
I have a split dbase and have been running the backend on a server which was linked using a mapped network drive letter and path. Now I'm trying to connect it to a path like this. Is it possible?
I have a button that allows a user to select a file using the windows select file dialog using the following code:
Dim fd As FileDialog Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd .Title = "Select A Text file to Import" .Filters.Add "Text File", "*.txt" .FilterIndex = 1 .AllowMultiSelect = False .InitialFileName = CurrentProject.path result = .Show If (result <> 0) Then Me!txt_path = Trim(.SelectedItems.Item(1)) End If End With
Is there a way that I can capture the path of the file they select in a separate text box?
I went to the Microsoft knowledge base (304408) and found a routine that automatically logs off users with a short warning. It works fine, but depends on the presence or absence of a small text file which is named chkfile.ozx. The file is referenced in a form timer function as follows:
Dim StrFilename as String strfilename = Dir("c:MyDirectorychkfile.ozx")
The function then tests for its presence and does its thing. You trigger the logoff by going in as sysop and changing the name of the file so it is no longer found.
The problem I have is that on the network, I use the backend file on the network and different users map different letters to it. I get around this by linking using UNC eg. \ServerNameSYSData_be.mdb.
I put the chkfile.ozx into this directory since all users presumably have access to it.
I tried changing the trigger function to
strfilename = Dir("\ServerNameSYSchkfile.ozx")
but the program doesn't recognize the presence of the file. When I map it as "F:SYSchkfile.ozx" it works, but since all users will not be mapped to "F", it really isn't a solution.
Does anyone know the proper syntax to include in the Dir method for UNC naming?
I nave a code which allows the user to upload a file to a folder "images". I want to be able to record the filename and path in a table called "attachments". But I am not sure how. Can anyone help
Private Sub Command0_Click()
Dim FD As FileDialog Dim Name As String Dim Name2 As String Dim Pathx As String Dim Path As String Pathx = Me.Application.CurrentProject.Path & "Images" Path = Me.Application.CurrentProject.Path Set FD = Application.FileDialog(msoFileDialogFilePicker) Dim vrtSelectedItem As Variant With FD .AllowMultiSelect = False 'Add a filter that includes GIF and JPEG images and make it the second item in the list. .Filters.Add "PDF", "*.pdf, 1"
'Sets the initial file filter to number 2. '.FilterIndex = 2
If .Show = -1 Then For Each vrtSelectedItem In .SelectedItems Name = Dir(vrtSelectedItem, vbSystem) Name2 = Pathx & Name If Name2 = vrtSelectedItem Then Else FileCopy vrtSelectedItem, Pathx & Name End If
I want output the file in the current directory, the above code is specific the path, how can I edit the current path, so whereever the the database is either drive, they still can work.
The concept is like that DoCmd.OutputTo acOutputReport, "Appr", acFormatRTF, currentdirectory:"Appr.rtg", False
I have very very basic skills in Access and have been attempting to work with a database that a previous employee from my office designed. The other day another person in my office moved the folder on our office network that contains the link to open the database and today when I entered our database and tried to click on one of the forms to enter data it is telling me that the path name for that form cannot be found. How do I edit the path name for a form?
Can somebody guide me for hyperlink in form field. I have seen northwind db sample emplyee form and exactly I want this for my db. but not image but the link for *.pdf file.
Here issue is I have 400 documents and I want code which will automatically pick up the path of file using the id or number of form field. Means one designated folder and access field will pick up path matching the number.
I have transfered an MS Access file to my PC from another, but when i try to open the forms in the database, an error occurs.It states that the path is not valid.
How can i correct the path? Do i have to define the path for each form, report an etc seperately?
i am using file browser to save a file in MS ACCESS forms. However, i want another file browser to allow the user to specify the folder he wants, then from the folder he selects, i will generate a series of codes. Any advice on How can tat be done?
I need to ascertain the current link path for my back end DB tables. Using Application.CurrentDB.Name returns the current MDB file - but I need the DB file for the linked tables? Any ideas please?