> The only thing I can think of would be to use your form to control that. Use
> the form's timer event so it periodically checks for a new file in the folder
[quoted text clipped - 14 lines]
> >
> > Thanks in advance for any ideas :)
I would suggest using two different subfolders in one Pictures folder. One
for pictures not yet added to the database and one for those already added.
It would be like
c:\pictures
c:\pictures\new
c:\pictures\filed
Then in the time event, use the Dir function to see if a new file is in the
new folder and if so, add its name to the database, then use the Name
statement to move the file to the filed folder
Const conSourcePath As String = "c:\pictures\new\"
Const conDestPath As String = "c:\pictures\filed\"
Dim strFileName As STring
strFileName = Dir(conSourcePath)
If strFileName <> vbNullString Then 'New Picture Found
Name conSourcePath & strFileName As conDestPath & strFileName
Me.txtPictureFile = conDestPath & strFileName
End If

Signature
Dave Hargis, Microsoft Access MVP
> Sounds interesting, any ideas how to do this? And just FYI, Im running access
> 2007. And what I have in mind is just like an employee database, in which I
[quoted text clipped - 20 lines]
> > >
> > > Thanks in advance for any ideas :)
Joe - 02 May 2008 06:03 GMT
Ok, sounds great, Ill try it out. Just one more question, if there's a
filename that already exists on the "filed" folder, how can I prevent it to
be overwriten? I suppose you can come up with a code to change the name (like
adding a number) to the filename? so nothing will be overwriten but renamed
instead if aplicable?
> I would suggest using two different subfolders in one Pictures folder. One
> for pictures not yet added to the database and one for those already added.
[quoted text clipped - 42 lines]
> > > >
> > > > Thanks in advance for any ideas :)
Klatuu - 02 May 2008 15:19 GMT
That would be a reasonable thing to do. You could use the Dir function to
check for the existance of the file and if found, rename the file:
Const conSourcePath As String = "c:\pictures\new\"
Const conDestPath As String = "c:\pictures\filed\"
Dim strFileName As String
Dim strCheckFile As String
Dim lngFileNo As Long
strFileName = Dir(conSourcePath)
If strFileName <> vbNullString Then 'New Picture Found
strCheckFile = Dir(conDestPath & strFileName)
Do While strCheckFile <> vbNullstring
lngFileNo = lngFileNo + 1
strFileName = strFileName & Format(lngFileNo, "00")
strCheckFile = Dir(conDestPath & strFileName)
Loop
Name conSourcePath & strFileName As conDestPath & strFileName
Me.txtPictureFile = conDestPath & strFileName
End If

Signature
Dave Hargis, Microsoft Access MVP
> Ok, sounds great, Ill try it out. Just one more question, if there's a
> filename that already exists on the "filed" folder, how can I prevent it to
[quoted text clipped - 48 lines]
> > > > >
> > > > > Thanks in advance for any ideas :)