PrimoSteve
Technical User
I have a form that displays a Gridview-like with 20 button controls (displays different products with the name and image)
I have several other button controls which represents Categories and when click calls this function "Call Display_Products"
Function Display Products
w = 0
q = 0
For z = 1 To 20
Me.Products = Me.Products.ItemData(z - 1)
Me.Controls("ProductName" & z).Caption = Nz(Me.Products.Column(1), "")
Me.Controls("ProductName" & z).Picture = Nz(Me.Products.Column(2), "")
If IsNull(Me.Products.ItemData(z - 1)) Then
Me.Controls("ProductID" & z).Value = Null
Me.Controls("ProductName" & z).Visible = False
Else
Me.Controls("ProductName" & z).Visible = True
q = z
Me.Controls("ProductID" & z).Value = Me.Products.Column(0)
w = w + 1
End If
This works fine in my own personal pc just as long as the images are stored in My documents.
Otherwise, I get a runtime error 2214 POS doesn't support the format of the file 'Buuter.gif,' or file is too large. Try converting to BMP format.
I've installed this in my work pc but I'm getting the same runtime errors whether the images are stored in My Documents or elsewhere
Note: I've tried using BMP, PNG, JPGS and even tried changing the ProductImage field to short text but still same thing
ProductID Autonumber
CategoryID Number
ProductName ShortText
ProductImage Attachment
Description ShortText
So I've decided to use the image control instead of the button control but can't seem to get my head around calling the image control instead of the button control. I'm still getting the same runtime error
Me.Controls("ProductName" & z).Picture = Nz(Me.Products.Column(2), "")