-
Check for the presence of a picture.
Hello, I need your help. I need to obtain a control of this type.
If the folder C: \ cover, there is a cover whose name is simply the ID number associated with jpg extension, then in the text box to be shown the path, or if the file is not present, must leave the path empty. I would have written this command (I admit that not intuendomi programming, I tried to get there by reading the guides on the internet)
My problem is that I would need that instead of C: \ 1.jpg were written "C: \ [ID]. Jpg". In practice, depending on the ID corresponding came for the given file. "Jpg" with the same number eg. if I get the ID 150 should be verified at the presence of the file C: \ 150.jpg
file = "C:\1.jpg"
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(file) Then
Me.[132] = "1.jpg"
Else
Me.[132] = vbNullString
End If
thanks
Hello
Last edited by RuralGuy; 08-08-2013 at 08:01 AM.
Reason: Changed the subject to English
-
Have you tried:
file = "C:\" & Me.ID & ".jpg"
-
-
-
Your welcome. Is your issue now resolved?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules