con questo codice sposto un file da una cartella ad un'altra ed elimino la relativa dataaccesspage:
codice:
Dim OldNamePage, NewNamePage
OldNamePage = CurrentProject.Path & "\Biografie\" & Me.IDArtista & Me.Link & ".htm": NewNamePage = CurrentProject.Path & "\Cestino\Biografie\" & Me.IDArtista & Me.Link & ".htm"
Name OldNamePage As NewNamePage
DoCmd.DeleteObject acDataAccessPage, Me.IDArtista & Me.MkPage
mentre con questo sposto più file htm da una cartella all'altra:
codice:
Dim strFullPath As String
strFullPath = CurrentProject.Path & "\Cestino\Recensioni\" & Me.IDArtista
DirExists (strFullPath)
Dim FileObject
Set FileObject = CreateObject("Scripting.FileSystemObject")
FileObject.MoveFile CurrentProject.Path & "\Recensioni\" & Me.IDArtista & "\*.htm", strFullPath & "\"
Set FileObject = Nothing
RmDir CurrentProject.Path & "\Recensioni\" & Me.IDArtista
cosa devo aggiungere alla seconda parte del codice per eliminare (come nel primo caso) anche le dataaccesspages di riferimento?
Qualsiasi consiglio è ben accetto!!!
Grazie in anticipo a tutti!