General :: Checking Specific File For Documents With Same Name

Jun 4, 2014

I have a button that when pressed it checks a specific file for documents with the same name (example: Test, Test 1, Test 180, ect...)

Code:
Dim StrFile As String
StrFile = Dir("C:UsersJohnDesktopTest*test*")
Do While Len(StrFile) > 0
Debug.Print StrFile
MsgBox StrFile
StrFile = Dir
Loop

The problem with this is if there are 2 files with Test (Test, Test - Copy) It gives me 2 separate message boxes. The first with Test. Then a second message box with the second file, Test - Copy. I want to combine both of the message boxes in to one. So the message box would look like:

Test
Test - Copy

View Replies


ADVERTISEMENT

Modules & VBA :: Check For Documents With Specific Naming Structure

Apr 30, 2014

I want to hit a button and then it scans for a file on a server and return with a message box saying if it exists or not.

I want it so when I am on a Specific record it will search for certain requirements.

All the file names are pdf files with the same naming structure

SIT yy m(m) dd Last Name Unique Identifier
Example:
SIT 14 5 21 Smith ABCD1234567
SIT 14 10 21 Smith ABCD1234567

So I hit the button it sweeps the file path and looks for documents with this naming structure.

Last Name and Unique Identifier are fields within the db.

Last Name = txtLName

Unique Identifier = txtUniqIden

So far I have the following:

Code:
Dim strDirName As String
Dim strDirPath As String
Dim strDirName As String
Dim strDirPath As String

[Code] ....

So Far it works and I used the actual name of the items an it finds them but I need to up each record.

I have no clue how to begin with the strDirName. How to get it to scan the file name in a specific format.

View 3 Replies View Related

General :: Save A File To A Specific Folder On Server

Feb 23, 2013

We have a server that we use to run a Microsoft Access application. This application creates folders, subfolders and files on the server.Users are in 4 different offices. Each office has at least 3 computers. Some users also work from home.

Users creates file through word, or scanning a document or by saving an email on their local pc.My problem is that users need to be able to save a file to a specific folder on server.

View 1 Replies View Related

Modules & VBA :: Universal Short File Path To Documents Folder?

May 27, 2014

I have the code below and I want it to open a file from my documents folder. The only problem is that every computers path is different to this folder. Any easy way to work around and open a file in My Documents without the full path?

I want to eliminate the part of the path in red and make it universal because computers will have a different number.

Operating System: Windows 7

Code below:

Public Function AddITARPicOffloadAnalysis()
Dim xlApp As Object
Set xlApp = CreateObject("Excel.Application")
With xlApp
Dim wb As Object
Dim ws As Object
Dim Lastrow As Long

[Code] .....

View 9 Replies View Related

Checking For Attached File

Jan 25, 2005

I would have thought this was easy, but I keep getting an error.
I have a form with a save button. When the save button is clicked, I want it to check if user has attached an OLE object to a bound object frame. If they have, I'd like a checkbox to be true.
Here's the code I tried:
If Attachment.LpOleObject = 0 Then
Attach.Value = False
Else
Attach.Value = True
End If
This seems so incredibly straight forward and it does work if there is an attachment. If there isn't I get the message that my database can't retrieve the value of this property.

Any help would be greatly appreciated.

View 4 Replies View Related

General :: Order Of Tabbed Documents

Oct 17, 2012

Because of certain design considerations and the amount of data I'm maintaining, I have chosen to use tabbed documents rather than floating windows or subforms.

The hierarchy is supposed to be a person who is categorized as either a client, family member, donor, etc. Further, a client may use one or more services. In the example, our client uses Specialized Home Care. However, the tabs are intuitively out of order: the people tab is left-most, followed by the Specilaized Home Care tab, and lastly the Client tab. It should be People, People:Client, People:Client:Service. If a person uses a lot of our services, there will be separate People:Client:Service tabs and the People:Client tab will scroll off to the right. I'd like Access to order them properly but see no way to do it.when the forms are opened, it's people first followed by the high-level classification (i.e. Client), and the lastly the specific Client:Service tabs. I would expect Access to open and display them left to right, but, as you can see, it doesn't.

View 7 Replies View Related

Kindly Check What Is Wrong In Checking An Excel File Open Or Not

Sep 17, 2004

halloo everybody
Here is my code to check an excel sheet wether it is open or not.
It is working good in the following situations.

1.if the excel file is not yet opened. then it is opening and bringing a value from some cell of the sheet1.
2.If the file is already opened and not yet closed. it is not opening again it is understanding that the file is already openrd and bringing the cell value.
3.It is working when it is closed by the user and again clicked the button to open. It is opening and bringing the value.
4.NOW the problem starts.
IT IS NOT WORKING , If I click the button again to open. It is opening another copy of the same file. I did't understand why is it working perfectly? before I close the file and not working if I close the File.

please kindly check my code and respond to me .
here is my code but it is not working when the file is already opened.


Private sub Cmd_Click()

Dim XL As New Excel.Application
Dim wbk As New Excel.Workbook
Dim ws As New Excel.Worksheet


WorkBookName = "Book2.xls"
If Not WorkbookOpen(WorkBookName) Then
chk = 1
Set wbk = XL.Workbooks.Open("C:Dokumente und EinstellungenKiran KarnatiDesktopEXCELBook2.xls")
Else
Set wbk = Workbooks(WorkBookName)
End If

Set ws = wbk.Worksheets("Sheet1")
If chk = 0 Then
With ws
Label48.Caption = .Cells(1, 2).Value
.Cells(1, 3).Select
End With
Else
With ws
Text49.Value = .Cells(1, 2).Value
End With
End If
XL.Visible = True

Set SA = Nothing
Set XL = Nothing
Set wbk = Nothing
End Sub
_________________________________________________


Function WorkbookOpen(WorkBookName As String) As Boolean
'Returns TRUE if the workbook is open
WorkbookOpen = False
On Error GoTo WorkBookNotOpen
If Len(Excel.Workbooks(WorkBookName).Name) > 0 Then
WorkbookOpen = True
Exit Function
End If

WorkBookNotOpen:
End Function

Thank you.
Kiran.

View 1 Replies View Related

General :: Button Attaching Documents To Forms

Jul 18, 2012

I'm trying to use this API in my database to be able to attach documents to my forms. [URL] .....

Do I have to put this into its own Module? I'm not familiar with how the code is defining Types and declaring Global variables.

View 5 Replies View Related

General :: Creating Database For Indexing / Organizing PDF Documents

Mar 19, 2013

I would like to Create a database for indexing / organizing PDF documents. My Company currently use a 3rd party accounts program and we raise sales and purchases using numerical numbers ( but we can Jump to a new range of numbers within the program) for example if the purchase order numbers become simliar to the sales order numbers. But this 3rd party software does not let us scan documents into it hence the need for an alternative database.

For the data base I was thinking if only creating a index of the sales order numbers to start with. the first few question I have are.

1.) Should I Use the Autonumber as my first index column or should I replace it with our own sales order numbers in that column.

2.) is there a way to autopopulate the sales order numbers in a table for historical sales numbers.

3.) can you scan directly into Access

How to start planning the design off the database as I know this is almost the most important aspect of a database.

View 2 Replies View Related

General :: Evaluation Form - Scanning Documents To Get Counts

Nov 6, 2013

Once a year we have a conference that has about 400 people attend. These people will participate in several classes, randomly, over a four day period. Each class hands out an evaluation form. This form has six categories and asks you to rate each from 1 to 5. This is done with a grid on the form labeled with 1 2 3 4 5 across the top and the attendees will put a checkmark or X in the appropriate box. This results in approximately 3000 evaluation sheets.

I will take these and manually enter the scores into a database I created in order to tally the results and generate reports. I have been asked to see if this process can be expedited by using a scanner to pull the scores from the sheets.

View 1 Replies View Related

General :: Saving Program To Current User Documents Folder?

Aug 31, 2014

I have an access program and i want it to save a copy into a location... ive got it so it can save however - i want it to save to the current users documents folder (win 7)

What file path would i use?

View 5 Replies View Related

General :: Retrieve Links To Find Some Documents - Adding Message Box?

Dec 21, 2012

I have a report named Link_report which retrieve links to find some documents. I would like to add a Msgbox to say: " No link has been found for this document" when the case link is empty.

View 10 Replies View Related

General :: OnClick Event - Checking For Null Data

Jan 10, 2014

So on a command button I have this code in the OnClick event. When I click the button it will ask me to enter the name if blank but if I enter something in that field and then delete the data is bypasses this. Does the same reason field, Why?

Code:
If IsNull(Me.CE) Then
MsgBox "Please enter your name"
Me.CE.SetFocus
Exit Sub

[Code] ....

View 1 Replies View Related

Trying To Save Report To Specific File

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

General :: Mail Merge Word File (using Data From Access File)

Mar 11, 2014

I often create contract using mail merge. I have an access file that I want to use as data source for word file. But it does not automatically.

Please download the attached file !

If there are 1 customer and 1 property, I do not need to do anything. Conversely, if there are many customers and many properties, I take time to manipulate.

Firstly, I open the word file. I have to copy and paste paragraphs that I want. Highlight of the original paragraphs is blue.

Secondly, I click 'Insert Word Field' -> select 'Next Record'.

In short, I wish to use VBA in access file to automatically perform the steps that I have outlined.

View 3 Replies View Related

General :: Forms And Queries In One ACCDB File - Path Setting To Linked Table File

Oct 5, 2014

I've got the forms and queries in one .accdb file and my tables in a separate .accdb file. The forms file links to the tables in the tables file. The tables file resides in a folder called simply enough C:acc_tables and thats where i browsed to (obviously) when i set up the linkage.

One of the users does not wish (for whatever goddamn reason) to create a C:acc_tables file to stick the tables file in , and wants the tables file in some other folder.. Unfortunately this user does not have the skills to delete the existing links and re-link to the tables file after putting it in the folder he wants.

Where in the file that holds the forms and and queries do i find the path setting to the tables linked file? Can it be changed without deleting links and then re-linking?

View 4 Replies View Related

Autostart A Specific Form When Opening Mdb File

Mar 14, 2005

hello,
i have an .mdb file, with one main form in it.
i want to send to some friends of mine this file, but i want that when the file is opened, automatically, that main form will be opened.
how can i do that?

thank you.

View 4 Replies View Related

Modules & VBA :: DOMDocument - How To Get Specific Data Out Of XML File

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

General :: Make Accdr File Out Of Accde File?

Sep 10, 2012

How do I make an accdr file out of an accde file?

View 9 Replies View Related

General :: Follow Hyperlink To A File Without Using File Extension?

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

General :: Batch File To Check (version) Of A File?

Aug 28, 2012

I use a batch file to distribute the front end of a database application. Currently, everytime the user clicks the shortcut on her desktop, the batch file executes and copies the front end from a network location to user's local machine. The FE is updated like every couple of days. The users run the database more frequently.

I would like to modify the batch file so that it checks some attribute of the FE file to decide whether it needs to be updated. I can't rely on file size, since the FE includes temporary tables. I essentially need something like the "tag" property of form controls, only for files. It would be ideal if it was me who sets this property, like "version number". Except it has read without opening the file itself.

View 14 Replies View Related

Login And Redirect Users To Specific Directory, File, Or URL

Apr 28, 2005

Hi guys,

I need help in setting up a login page which would redirect users to their specific directory, file, or URL.
I'm able to create the login page without any problem but i'm unsure what exactly i need to do afterwards to get this to work.

can someone, anyone please help


your help would be much appreciated.


please mail me with any information you might have the1@studio9.shacknet.nu


thanks in advance.

View 1 Replies View Related

Modules & VBA :: Extract Specific Data From A Text File

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

Forms :: Form Indicator If A Specific File Exist

Feb 7, 2014

I have a form with more records lines. For each record I have a button what will open a specific file if exist.

Dim strFoldername As String
strFoldername = Me.Scan
If Dir("M:Applications AccessCredit autorisationsDocuments" & strFoldername, vbDirectory) = "" Then
MsgBox "Missing document"
Else
FollowHyperlink "M:Applications AccessCredit autorisationsDocuments" & strFoldername
End If

To verify if the file exist, instate to press the button, I like to indicate on a new field [Ctrl_Doc], the presence of respective file. (Ex: True or False). I tried this, but doesnt work:

Private Sub Form_Load()
If Len(Dir("M:Applications AccessCredit autorisationsDocuments" & strFoldername, vbDirectory) >0) Then
[Ctrl_Doc]= True
Else
[Ctrl_Doc]= False
End If

View 11 Replies View Related

Modules & VBA :: Export Query Results To Excel With Specific File Name?

Jul 8, 2014

I have a form with a list of names. When a specific name is selected from the list, a button is clicked and a query is run with the specific name as the criteria/filter.

I've written code to export these same query results to an Excel sheet, and I want the Excel file name saved with the name selected in the form.

Below is the code that I've written that doesn't work.

Code:

Dim strFileName As String

strFileName = SelectedItems(Me.lstName)

DoCmd.OutputTo acOutputQuery, "qryFocal_Sheet", acFormatXLS, "C:JRSWorkEquityFY2015" & strFileName & ".xls"

View 7 Replies View Related

Modules & VBA :: Using Access To Check Whether A Specific File Exists On A Website?

Aug 19, 2013

Actually what I am looking to do is have an Access application check some Web site for the presence of a number. This number could be the Serial number of the application and if this number exists to maybe show a message in the aplication or even terminate the application.

A quick and dirty way is for User Serial number 254, to put on a specific page of a Web site say arbitrary file 254.jpg (invisible on the Web site). The application would check for the existence of this file and if it is there, it could take some action. Everything would have to be done in stealth mode.

The following code can tell me if a specific URL exists, in this case [URL]

Code:

Private Sub cmdArbitray_Click()
Dim blnDum As Boolean
blnDum = blnCheckURL("http://www.VisualDentist.com")
' If blnDum = True then it exists
End Sub
Public Function blnCheckURL(ByVal strURL As String) As Boolean
Const FLAG_ICC_FORCE_CONNECTION As Long = &H1
blnCheckURL = (InternetCheckConnection(strURL, FLAG_ICC_FORCE_CONNECTION, 0&) <> 0&)
End Function

1) How can I check for file 254.jpg?

View 1 Replies View Related







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