I am rather new to Access, and I have previewed other forums for guidance (Like this one) in attempt to fulfill my idea. Unfortunately, I have been receiving errors regardless of my approach.
I have renovated the Asset Inventory Access 2010 template to track assets, each record having a combo listing with that item's [Country]. I have a continuous form that neatly lists all the records as it seems that the image won't display on a datasheet form. This is the code in the Form_Current().
[ImageFrame] has the following properties
PictureType=Lin ked
Picture=(none)
This code results in the image control populating the Other.jpg for all records and an error message "Error Detected, error #0," Would anyone be able to point out to me the possible error that is occurring?
Additional Information:If it helps. I do have a tbl_Countries that contains the fields [Country] and [CountryAbbrevia tion]. I use this to populate the [tbl_Assets].[Country] field. If it is better to add an additional field in tbl_Countries to hold the full path, please let me know how to successfully implement this alternative. Thanks in advance to whomever helps!
I have renovated the Asset Inventory Access 2010 template to track assets, each record having a combo listing with that item's [Country]. I have a continuous form that neatly lists all the records as it seems that the image won't display on a datasheet form. This is the code in the Form_Current().
Code:
Private Sub Form_Current()
On Error GoTo ErrHandler
If Me![Country] = "AS" Then
Me![ImageFrame].Picture = "\\FullPath\Australia.jpg"
ElseIf Me![Country] = "DK" Then
Me![ImageFrame].Picture = "\\FullPath\Denmark.jpg"
Else
Me![ImageFrame].Picture = "\\FullPath\Other.jpg"
End If
ErrHandler:
MsgBox "Error detected, error # " & Err.Number & ", " & Err.Description, vbOKOnly, "Error"
End Sub
PictureType=Lin ked
Picture=(none)
This code results in the image control populating the Other.jpg for all records and an error message "Error Detected, error #0," Would anyone be able to point out to me the possible error that is occurring?
Additional Information:If it helps. I do have a tbl_Countries that contains the fields [Country] and [CountryAbbrevia tion]. I use this to populate the [tbl_Assets].[Country] field. If it is better to add an additional field in tbl_Countries to hold the full path, please let me know how to successfully implement this alternative. Thanks in advance to whomever helps!
Comment