path of picture in field

sahh1419

Registered User.
Local time
Tomorrow, 03:19
Joined
Dec 27, 2012
Messages
29
i want to store file path in cell value not in form.and i want to use this path to show picture in corel draw print merge.how to i save the file path into a string? (if i click on properties of the image, the file path is under the picture property)
 
The value to be stored is a string, typically less than 128 bytes unless you have an unusually deep directory structure. If the record holding the string in question is bound to the form, then you would use the Form_Current routine to copy the string in question to the .Picture property of the image. If you wanted to actually see the string holding the path as well as the picture, you would just have a text box for the stored string. If you didn't really want to see the path as a text string, you could store it in a text box for which you set the .Visible property to False. If you do that, then it would still be loaded by the Form_Current event and would be available for this manipulation.

The other question would be how you get that image the first time. For that, you can look up the "File System Object" to see how to use the standard file picker dialog. In essence, there is way to use that picker, get back a string, and then you can do what you need with the string.

If you got ambitious, you could test in the Form_Current routine whether the bound path field is empty. If not, load it to the .Picture property and you are done. If empty, trigger the file picker dialog, get back the string, store it in the (invisible) field for the path AND store it in the .Picture property of the image. When you leave that record, it will automatically update the stored path property. Or, if you have a command button set up to save the record, that would write back the updated path field as well.
 

Users who are viewing this thread

Back
Top Bottom