i am having trouble with an image reference field on a form
1) i cant seem to get the onchange event to fire when i right click the field and change the image in the form. Is there some other way to accomplish this?
2) i would like to retreive the actual qualified file name to the referenced image to store in another field on the form
i have finally got some code to work but i think that i may have made this harder than necessary. if anyone would mind
helping me out i would appreciate it.
here is my code:
'Date Created: 13-Jun-2005 09:45:02 PM
'Last Updated: 13-Jun-2005 11:33:13 PM
'Created By : martin
'Updated By : martin
dim fld as P
dim tbl as P
dim txt as C
dim mytxt as C
dim mylen as N
dim mymode as C
tbl = table.current()
fld = tbl.field_get("Prod_Medpic")
txt = fld.value_get()
'ui_msg_box("Text Memo Contents1", txt)
mytxt = substr(txt,19)
mylen =len(mytxt)-2
txt =substr(mytxt,1,mylen)
mytxt = "C:" + txt
'ui_msg_box("Text Memo Contents2", mytxt)
fld = tbl.field_get("Prod_Medpic_Location")
mymode =tbl.mode_get()
if mymode "" "Chamge" then
tbl.change_begin()
fld.value_put(mytxt)
tbl.change_end()
else
fld.value_put(mytxt)
end if
tbl.refresh()
3) i would also like to retreive the path and name for an image imbedded in the database but havn't come close to figureing that one out.
thanx in advance to all who might help
martin
1) i cant seem to get the onchange event to fire when i right click the field and change the image in the form. Is there some other way to accomplish this?
2) i would like to retreive the actual qualified file name to the referenced image to store in another field on the form
i have finally got some code to work but i think that i may have made this harder than necessary. if anyone would mind
helping me out i would appreciate it.
here is my code:
'Date Created: 13-Jun-2005 09:45:02 PM
'Last Updated: 13-Jun-2005 11:33:13 PM
'Created By : martin
'Updated By : martin
dim fld as P
dim tbl as P
dim txt as C
dim mytxt as C
dim mylen as N
dim mymode as C
tbl = table.current()
fld = tbl.field_get("Prod_Medpic")
txt = fld.value_get()
'ui_msg_box("Text Memo Contents1", txt)
mytxt = substr(txt,19)
mylen =len(mytxt)-2
txt =substr(mytxt,1,mylen)
mytxt = "C:" + txt
'ui_msg_box("Text Memo Contents2", mytxt)
fld = tbl.field_get("Prod_Medpic_Location")
mymode =tbl.mode_get()
if mymode "" "Chamge" then
tbl.change_begin()
fld.value_put(mytxt)
tbl.change_end()
else
fld.value_put(mytxt)
end if
tbl.refresh()
3) i would also like to retreive the path and name for an image imbedded in the database but havn't come close to figureing that one out.
thanx in advance to all who might help
martin
Comment