Hi,
yes I see it, there in the left properties, which is for the OLD image frame, that is the path to the image I use when in design mode, the one with red size lines just about visible, that image doesnt show in normal view.
The OLD as well as the new Image Control has a field text box above it on its form into which I type the image path (or paste !) for the image control to feed on !
However your coding might be shedding light on this.
Here is coding I have found having clicked on form in top left corner in design view and selected show code, I have a number of image controls all from OLD access, the IAC_FilePath is for a small control showing code number or letter on the aircraft , the main picture was fed path from Picture1_FilePath field, sat just above the image on the form as mentioned:-
Code:
in top windows it says
(General) IAC_FilePath_AfterUpdate
Option Compare database
Option Explicit
Private Sub Form_Current()
On Error Resume Next
If IsNull(Me![IAC1stdigit_FilePath]) Then
Me![IAC1stdigit_frame].Visible = False
Else
Me![IAC1stdigit_frame].Picture = Me![IAC1stdigit_FilePath]
Me![IAC1stdigit_frame].Visible = True
End If
If IsNull(Me![IAC2nddigit_FilePath]) Then
Me![IAC2nddigit_frame].Visible = False
Else
Me![IAC2nddigit_frame].Picture = Me![IAC2nddigit_FilePath]
Me![IAC2nddigit_frame].Visible = True
End If
If IsNull(Me![BKZ_FilePath]) Then
Me![BKZ_frame].Visible = False
Else
Me![BKZ_frame].Picture = Me![BKZ_FilePath]
Me![BKZ_frame].Visible = True
End If
If IsNull(Me![SBAC_FilePath]) Then
Me![SBAC_Frame].Visible = False
Else
Me![SBAC_Frame].Picture = Me![SBAC_FilePath]
Me![SBAC_Frame].Visible = True
End If
If IsNull(Me![GWE_FilePath]) Then
Me![GWE_frame].Visible = False
Else
Me![GWE_frame].Picture = Me![GWE_FilePath]
Me![GWE_frame].Visible = True
End If
If IsNull(Me![GPE_FilePath]) Then
Me![GPE_frame].Visible = False
Else
Me![GPE_frame].Picture = Me![GPE_FilePath]
Me![GPE_frame].Visible = True
End If
If IsNull(Me![SE_FilePath]) Then
Me![SE_frame].Visible = False
Else
Me![SE_frame].Picture = Me![SE_FilePath]
Me![SE_frame].Visible = True
End If
If IsNull(Me![PE_FilePath]) Then
Me![PE_frame].Visible = False
Else
Me![PE_frame].Picture = Me![PE_FilePath]
Me![PE_frame].Visible = True
End If
If IsNull(Me![Picture1_FilePath]) Then
Me![Picture1_frame].Visible = False
Else
Me![Picture1_frame].Picture = Me![Picture1_FilePath]
Me![Picture1_frame].Visible = True
End If
If IsNull(Me![Picture2_FilePath]) Then
Me![Picture2_frame].Visible = False
Else
Me![Picture2_frame].Picture = Me![Picture2_FilePath]
Me![Picture2_frame].Visible = True
End If
If IsNull(Me![Picture3_FilePath]) Then
Me![Picture3_frame].Visible = False
Else
Me![Picture3_frame].Picture = Me![Picture3_FilePath]
Me![Picture3_frame].Visible = True
End If
If IsNull(Me![Picture4_FilePath]) Then
Me![Picture4_frame].Visible = False
Else
Me![Picture4_frame].Picture = Me![Picture4_FilePath]
Me![Picture4_frame].Visible = True
End If
End Sub
here was a thin line across page
Private Sub IAC_FilePath_AfterUpdate()
On Error Resume Next
If IsNull(Me![IAC1stdigit_FilePath]) Then
Me![IAC1stdigit_frame].Visible = False
Else
Me![IAC1stdigit_frame].Picture = Me![IAC1stdigit_FilePath]
Me![IAC1stdigit_frame].Visible = True
End If
If IsNull(Me![IAC2nddigit_FilePath]) Then
Me![IAC2nddigit_frame].Visible = False
Else
Me![IAC2nddigit_frame].Picture = Me![IAC2nddigit_FilePath]
Me![IAC2nddigit_frame].Visible = True
End If
If IsNull(Me![BKZ_FilePath]) Then
Me![BKZ_frame].Visible = False
Else
Me![BKZ_frame].Picture = Me![BKZ_FilePath]
Me![BKZ_frame].Visible = True
End If
If IsNull(Me![SBAC_FilePath]) Then
Me![SBAC_Frame].Visible = False
Else
Me![SBAC_Frame].Picture = Me![SBAC_FilePath]
Me![SBAC_Frame].Visible = True
End If
If IsNull(Me![GWE_FilePath]) Then
Me![GWE_frame].Visible = False
Else
Me![GWE_frame].Picture = Me![GWE_FilePath]
Me![GWE_frame].Visible = True
End If
If IsNull(Me![GPE_FilePath]) Then
Me![GPE_frame].Visible = False
Else
Me![GPE_frame].Picture = Me![GPE_FilePath]
Me![GPE_frame].Visible = True
End If
If IsNull(Me![SE_FilePath]) Then
Me![SE_frame].Visible = False
Else
Me![SE_frame].Picture = Me![SE_FilePath]
Me![SE_frame].Visible = True
End If
If IsNull(Me![PE_FilePath]) Then
Me![PE_frame].Visible = False
Else
Me![PE_frame].Picture = Me![PE_FilePath]
Me![PE_frame].Visible = True
End If
If IsNull(Me![Picture1_FilePath]) Then
Me![Picture1_frame].Visible = False
Else
Me![Picture1_frame].Picture = Me![Picture1_FilePath]
Me![Picture1_frame].Visible = True
End If
If IsNull(Me![Picture2_FilePath]) Then
Me![Picture2_frame].Visible = False
Else
Me![Picture2_frame].Picture = Me![Picture2_FilePath]
Me![Picture2_frame].Visible = True
End If
If IsNull(Me![Picture3_FilePath]) Then
Me![Picture3_frame].Visible = False
Else
Me![Picture3_frame].Picture = Me![Picture3_FilePath]
Me![Picture3_frame].Visible = True
End If
If IsNull(Me![Picture4_FilePath]) Then
Me![Picture4_frame].Visible = False
Else
Me![Picture4_frame].Picture = Me![Picture4_FilePath]
Me![Picture4_frame].Visible = True
End If
End Sub
What can you tell me about this code and how one would use it to create a NEW image control in the sub form purely for a large picture called MainPhoto_FilePath as can be seen from the property sheet you mention my screen dump for.
I am not sure what the Picture2 and Picture3 refers to as there was only one main photo, the smaller code frames were such as IAC1stdigit_frame fed by IAC1stdigit_FilePath and I have now selected that field for that frame in ControlSource, before discovering the problems with that new method, they feed on png images.
This was all done by a coding genius friend of mine years ago, I felt that should I ever add image controls I would have to get him to do so !
so in a Tbl_MainPhoto in which is a field MainPhoto_FilePath as well as ID_MainPhoto (a primary key) and ID_Aircraft which is its relationship one to many link to the main tables primary key, what coding would I need to place and where, something in that line you spotted in Picture.
am I right in saying it would say:-
Me.Image3.Picture = "MainPhoto_FilePath"
I try that and Msoft bdink's up warning Microsoft Access cant open the file Me.Image3.Picture = "MainPhoto_FilePath"
see attached image of my effort,
DBenz