DataBase - Verify file exists before moving it

Asked By Pastor Del
20-Nov-09 06:52 PM
My DB will move files from folder to folder depending on selections made by
user.  For maintain a professional look I want to verify that the file exists
before I try to move it.  What code can I use?
FileExist
(1)
Len
(1)
Lang
(1)
  Daniel Pineault replied to Pastor Del
20-Nov-09 07:01 PM
Take a look at:

http://www.devhut.net/index.php?lang=en&pid=0000000027#FileExist
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
  JP replied to Pastor Del
23-Nov-09 11:20 AM
If Len(Dir(Folder_Path_And_File_Name)) > 0 Then
' your file exists
Else
' it does not
End If

--JP

by
exists
  Pastor Del replied to Pastor Del
23-Nov-09 04:18 PM
Thanks for the help.
Create New Account
help
longitud falsa DataBase Contador1 = 1 MsgBox "LEN (CONTADOR1) : " & Len(Contador1) & " contador1 : " & Contador1 Siempre me dice que LEN(CONTADOR1) : 2 ¿porque sale que la longitud e Contador1 es igual a 2 cuando justo 1 = > " 1"; -1 = > "-1" Si quieres saber la longitud de una variable numerica deberías hacer: LEN(CSTR(Contador1)) Saludos los campos Contador1 y CONTADOR2 son integer Contador1 = 1 CONTADOR2 = 22 MsgBox "LEN (CONTADOR1) : " & Len(Contador1) & " LEN (CONTADOR2) : " & Len(CONTADOR2) el resultado es que en los dos tienen me da la Longitud = 2 ¿como
Automazione in word DataBase Modello = CurrentDb.Name Modello = Left(Modello, Len(Modello) - Len(Dir(Modello))) & On Error Resume Next Set Wrd = GetObject(, "Word.Application") If Err.Number = 429 il modello di word = E8 la seguente: Modello = 3D CurrentDb.Name Modello = 3D Left(Modello, Len(Modello) - Len(Dir(Modello))) & On Error Resume Next Set Wrd = 3D GetObject(, "Word.Application") If Err.Number ho parole! Ciao Vladimiro. keywords: Automazione, in, word description: Modello = CurrentDb.Name Modello = Left(Modello, Len(Modello) - Len(Dir(Modello))) & Anteprima_Comunicato.dot On Error Resume Next Set Wrd = GetObject(,
way, just use DoCmd.RunSQL or is there a better way? I know the PK. - - Len _ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ _ remove nothing for valid email address. Access Discussions DoCmd.RunSQL (1) CurrentDb.Execute (1) GstrLogonName (1) LogonName (1) Gruß (1) Len (1) Hi Len, .Len B schrieb: i would use CurrentDb.Execute "DELETE * FROM . . ." because this will not generate a like DoCmd.RunSQL will do. - - Gru?, Bernd - -- Access goes Subversion - http: / / oasis.dev2dev.de | Hi Len, | | .Len B schrieb: | > I have a table whose primary key is text (length 50). | > I need RunSQL. Since I only want to kill one record I guess it makes no difference. - - Len _ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ _ remove nothing for valid email address. keywords: Delete, record, using, vba description: I have
E9 = E0 = E9crire ma macro avec des If sous le formatage de MonEtatEnveloppe = 85. If Len(Reports![MonEtatEnveloppe]![MonSousEtat]![Nom]) < = 3D 30 Or _ Len(Reports![MonEtatEnveloppe]![MonSousEtat]![Rue]) < = 3D 30 Or _ Len(Reports![MonEtatEnveloppe]![MonSousEtat]![Ville]) < = 3D 30 Then Me.MonSousEtat.Left = 3D 7500 ElseIf Len(Reports![MonEtatEnveloppe]![MonSousEtat]![Nom]) > 30 And Len(Reports![MonEtatEnveloppe]![MonSousEtat]![ Nom]) < = 3D 40 Or _ Len(Reports![MonEtatEnveloppe]![MonSousEtat]![Rue]) > 30 And Len(Reports![MonEtatEnveloppe]![MonSousEtat]![Rue]) < = 3D 40 Or _ Len(Reports![MonEtatEnveloppe]![MonSousEtat]![Ville]) > 30 And Len(Reports![MonEtatEnveloppe]![MonSousEtat]![Ville]) < = 3D 40 Then Me