Link picturebox control to datasource
I want to store images in a image user field.
Somebody knows how to link a picturebox to a General/Image user field, because there is not specific image data type in BoDataType collection:
oUserDataSource = oUserForm.DataSources.UserDataSources.Add("rgto1",BoDataType.???
There is no data type as PICTURE, and what you need to do is to set the value of your binded datasource to the path of the picture.
Here is an example of binding the picture to a column of
Set oColumn = oColumns.Add("PICTURE", it_PICTURE) oColumn.TitleObject.Caption = "PICTURE" oColumn.Width = 200 oColumn.Editable = False '// Add a user data source matrix. oForm.DataSources.UserDataSources.Add "PICTURE", dt_LONG_TEXT, 500 '// bindidng the data Set oColumn = oColumns.Item("PICTURE") oColumn.DataBind.SetBound True, "", "PICTURE" '// setting the user data source data Set oUserDataSource = oForm.DataSources.UserDataSources.Item("PICTURE") oUserDataSource.Value = App.Path & "aaaa.JPG"
Hope this helps,