View Single Post
  #1  
Old October 7th, 2004, 11:27 PM
j.t.w
external usenet poster
 
Posts: n/a
Default Rename Image File - Skip

Access 2000.
Windows 2000 Pro and Windows XP Pro Desktops.

I have a subform (on a form) that displays a tif image. As I rename
the image, the image is renamed and moved to another file location and
the next image is displayed for me to rename. So far this works
correctly. The problem that I am having is that sometimes I come
across an image that I do not want to rename (and move). How do I move
to the next image? It seems as though the order the images are being
selected are by the date it was created.

Basically, I would like to "skip" (or disregard) the current image and
move to the next.

Could someone please let me know if this is even possible and how I
should go about solving this problem?

Here is a short version of what I have...

Private Sub cmdRenameFile_Click()
Dim strSourcePath As String
Dim strDestinationPath As String
Dim strExt As String
Dim strDir As String

strSourcePath = "\\ServerName\Images\"
strDestinationPath = "\\ServerName\Images\Renamed\"
strExt = ".tif"

strOldName = strSourcePath & txtCurrentName
strNewName = strDestinationPath & cboNewName & strExt

‘Rename the file.
Name strOldName As strNewName

‘Get the next file.
strDir = Dir(strSourcePath & "*.tif")

Forms!Rename_Files_frm!Rename_Files_subfrm.Form.im gDocument.Picture =
strSourcePath & strDir
txtCurrentName = strDir
cboNewName = ""
End Sub

Thank you in advance for any and all help.
j.t.w