A
André
Hello,
I create one relational database for a catalog with pictures. For one
product you can have more than 1 picture. For these sample, I have 2
tables :
One for the product and one for the detail.
Now, for the pictures, I save the name of the file (picture) in the
child table
Example
record (master) Product record (child) Detail
1 A 1 picture 1
2 picture 2
3 picture 3
When i create the form and sub-form to encode the data, i have i big
problem (child side). When i select a record, (the record 2 for
example), all records (1,2 and 3) for this item have the same picture
(here picture 2). If i select the record 3, all items will have the
picture 3
My question is : How i can show the picture 1 for record 1, picture 2
for record 2, and so on ....
For info : on sub form, on_current event, i put the following code :
If Me.photo_nom <> "" Then
' in case of the field is not empty, show the picture
Me.photo1.Picture = dir_photo & Me.photo_nom & ext
Else
' in case of empty field, show a default picture
Me.photo1.Picture = dir_defaut & "Bluefly_mycatalog.gif"
End If
Thank you for advance for your support
Andre
I create one relational database for a catalog with pictures. For one
product you can have more than 1 picture. For these sample, I have 2
tables :
One for the product and one for the detail.
Now, for the pictures, I save the name of the file (picture) in the
child table
Example
record (master) Product record (child) Detail
1 A 1 picture 1
2 picture 2
3 picture 3
When i create the form and sub-form to encode the data, i have i big
problem (child side). When i select a record, (the record 2 for
example), all records (1,2 and 3) for this item have the same picture
(here picture 2). If i select the record 3, all items will have the
picture 3
My question is : How i can show the picture 1 for record 1, picture 2
for record 2, and so on ....
For info : on sub form, on_current event, i put the following code :
If Me.photo_nom <> "" Then
' in case of the field is not empty, show the picture
Me.photo1.Picture = dir_photo & Me.photo_nom & ext
Else
' in case of empty field, show a default picture
Me.photo1.Picture = dir_defaut & "Bluefly_mycatalog.gif"
End If
Thank you for advance for your support
Andre