T
tasuki
Hi,
I'm not very good with VBA at all. Can someone help me
with this problem. I have a folder like this:
Database [Folder]
->DB.MDB
->Pictures [Folder]
--->PIC1.JPG
--->PIC2.JPG
The thing is the Database folder gets moved around a lot
for viewing and editing purposes. Right now the code
looks something like this to link images to the forms.
**code begin**
Private Sub Form_Current()
Me!Image44.Picture = "M:\Database\Pic\blank.jpg"
If Me![PicID] <> 0 Then
Me!Image44.Picture = "M:\Database\Pic\" & Me!
[PicID]
End If
End Sub
**code end**
[PicID] is the name of the file, Image44 is the control
box where the image goes. The problem is, I want the VB
code to automatically detect its current location (if
possible) and update it accordingly. Right now the
location is static... but I want it to change whenever it
gets moved.
IE. Moving to C:\Desktop\ --> changes link to
C:\Desktop\Database\Pic\
Can this be done? And if so, can anyone please help me?
Thanks!
-T
I'm not very good with VBA at all. Can someone help me
with this problem. I have a folder like this:
Database [Folder]
->DB.MDB
->Pictures [Folder]
--->PIC1.JPG
--->PIC2.JPG
The thing is the Database folder gets moved around a lot
for viewing and editing purposes. Right now the code
looks something like this to link images to the forms.
**code begin**
Private Sub Form_Current()
Me!Image44.Picture = "M:\Database\Pic\blank.jpg"
If Me![PicID] <> 0 Then
Me!Image44.Picture = "M:\Database\Pic\" & Me!
[PicID]
End If
End Sub
**code end**
[PicID] is the name of the file, Image44 is the control
box where the image goes. The problem is, I want the VB
code to automatically detect its current location (if
possible) and update it accordingly. Right now the
location is static... but I want it to change whenever it
gets moved.
IE. Moving to C:\Desktop\ --> changes link to
C:\Desktop\Database\Pic\
Can this be done? And if so, can anyone please help me?
Thanks!
-T