Hi, people,
I'm new in the forum, still I browse google after Access articles and always tumble, here. =] To my question:
In my new database, I'm doing with images. Each record has one PNG file associated, and the way I found to do the association comes from a field in my table that has the physical adress in a flashdrive. The reason the database it's in a flashdrive is cause I want some mobility of the database, from a computer to other, and so on. I've learned a VBA code that takes the field containing the path (carta_imagem) and associate it to a empty image object (cartapic) in a form. This is the code:
Private Sub Form_Current()
cartapic.Picture = carta_imagem
End Sub
The path its something like "G:\whatever\what\who\where\00.png", where the file name logically changes for each record. However, when I change the flashdrive from computer, the volume letter may change too, what brings "2220 error".
I've tried change the beggining of the path to "\\whatever\what\who\where" (two backslashs), like I saw on the video that explained the image linking, but no luck. I really believe this is a path issue, but with code envolved, I tought was best bring it to this code thread. Sorry for the long post, guys, and thank you, for any help you can give me.
I'm new in the forum, still I browse google after Access articles and always tumble, here. =] To my question:
In my new database, I'm doing with images. Each record has one PNG file associated, and the way I found to do the association comes from a field in my table that has the physical adress in a flashdrive. The reason the database it's in a flashdrive is cause I want some mobility of the database, from a computer to other, and so on. I've learned a VBA code that takes the field containing the path (carta_imagem) and associate it to a empty image object (cartapic) in a form. This is the code:
Private Sub Form_Current()
cartapic.Picture = carta_imagem
End Sub
The path its something like "G:\whatever\what\who\where\00.png", where the file name logically changes for each record. However, when I change the flashdrive from computer, the volume letter may change too, what brings "2220 error".
I've tried change the beggining of the path to "\\whatever\what\who\where" (two backslashs), like I saw on the video that explained the image linking, but no luck. I really believe this is a path issue, but with code envolved, I tought was best bring it to this code thread. Sorry for the long post, guys, and thank you, for any help you can give me.