| View previous topic :: View next topic |
| Author |
Message |
ladybird General User

Joined: 10 Feb 2010 Posts: 23
|
Posted: Mon Feb 15, 2010 2:43 am Post subject: How to Add link to a folder of images in my form |
|
|
| Hi, i already able to add image in my form using image control but i noticed that the file size of my database becomes bigger, is there a way to create a link to the folder instead for each record? thanks |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
|
| Back to top |
|
 |
ladybird General User

Joined: 10 Feb 2010 Posts: 23
|
Posted: Wed Feb 17, 2010 3:25 am Post subject: |
|
|
Hi the macro dont seem to work for me, is there any other way?
My table contains fieldname - "RecordNumber" and the image for each recordnumber is in a folder "Images"
ex. RecordNumber - 00001
Image filename in the folder - TC00001
how can i link them? thanks |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Wed Feb 17, 2010 3:37 am Post subject: |
|
|
Please details?
Romke |
|
| Back to top |
|
 |
ladybird General User

Joined: 10 Feb 2010 Posts: 23
|
Posted: Wed Feb 17, 2010 3:57 am Post subject: |
|
|
| RPG wrote: | Please details?
Romke |
I have a table called tblMain, it contains more than 20 fields for each records. I dont have a field to hold an image, because i just want to use a link, do i need to add another column for the image link or not? anyways here's a sample data, each record number has different photos of trays which are stored in a folder in the hard drive. I want to display each tray per record number.
RecordNumber Title Manufacturer
00001 A1 Company1
00002 A2 Company2
00003 A3 Company3
The filenames of my images is in this format - TC00001, TC00002, ....
I hope these details are enough... thanks |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Wed Feb 17, 2010 4:13 am Post subject: |
|
|
| read first before question |
|
| Back to top |
|
 |
ladybird General User

Joined: 10 Feb 2010 Posts: 23
|
Posted: Wed Feb 17, 2010 4:19 am Post subject: |
|
|
| RPG wrote: | | read first before question |
hi, i tried to insert the macro in the form events (after record change)
sub begintoon(oEv as object)
'begintoon means begin-show
' Call this macro every time when you load a new reord
' bind this to the form to the event go to new record
' this is not bound to the picture control
' The picture control has a empty date field
dim beginform
'dim UrlField as string
beginform=oEv.Source
Yourpicturename="ImageControl" 'Here comes the name of your control for the picture
UrlField="Path" 'Here comes the url of the picture out your data base
beginform.getbyname(Yourpicturename).ImageURL= beginform.getstring(beginform.findcolumn(UrlField))
end sub
but it doesnt seem to be doing anything, I inserted a new column in my table called Path with fieldtype text(varchar). In the table, i inserted "c:/pics/00001.jpg" for each record.
Sorry im new to OoBase, thanks |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Wed Feb 17, 2010 9:59 am Post subject: |
|
|
Hello
Use an image control for displaying the image.
Read care full the complete thread there all information is there.
Romke |
|
| Back to top |
|
 |
ladybird General User

Joined: 10 Feb 2010 Posts: 23
|
Posted: Thu Feb 18, 2010 1:39 am Post subject: |
|
|
| RPG wrote: | Hello
Use an image control for displaying the image.
Read care full the complete thread there all information is there.
Romke |
Hi, i have an image control already. its just that the image doesnt display in that control. Thanks |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Thu Feb 18, 2010 4:35 am Post subject: |
|
|
Hello
Read the end of page two there I have a lot of things explained. It was always for people who are new to OOo-base. Read first global and then those things you need. When you are working with OOo3.2 then only page two is maybe important.
I think you need no more macros, but read the information how to work.
Romke |
|
| Back to top |
|
 |
|