>>this should be fairly painless....
>>
>>asked to have a picture of client next to info on lead screen....
>>how do I add a picture of say myself for record number 1, and then a picture of you
>>for record number 2 ....without having my image pop up on rec2
>
>You can do it two ways. 1) Add the picture to a general field. (I don't ever do it this way. General fields tend to make the memo file very big fast...always a recipe for data corruption. 2) Add a character field that's used to store the path to a picture stored on disk.
>
>Here is a runnable example of #2 that you can paste into a prg called TEMP.PRG.
>
>CREATE TABLE MyPics ( MyName C(25), MyPic C(254) )
>INSERT INTO MyPics (MyName, MyPic) VALUES ("GoodNancy", HOME() + 'GRAPHICS\BITMAPS\ASSORTED\BEANY.BMP' )
>INSERT INTO MyPics (MyName, MyPic) VALUES ("BadNancy", HOME() + 'GRAPHICS\BITMAPS\ASSORTED\SMOKES.BMP' )
>
>LOCAL ox
>ox = NEWOBJECT('frmMyPics', 'temp.PRG')
>ox.SHOW(1)
>
>RETURN
>
>DEFINE CLASS frmMyPics AS FORM
> ADD OBJECT btnNext AS COMMANDBUTTON WITH ;
> CAPTION = "Next Pic", ;
> height = 24
>
> ADD OBJECT imgMyPic AS IMAGE WITH ;
> TOP = 25, ;
> HEIGHT = 80, ;
> WIDTH = 80
>
> PROCEDURE INIT
> GO TOP IN MyPics
> THIS.imgMyPic.PICTURE = MyPics.MyPic
> ENDPROC
>
> PROCEDURE btnNext.CLICK
> SKIP 1 IN MyPics
> IF EOF( 'MyPics' )
> GO TOP IN MyPics
> ENDIF
> THISFORM.imgMyPic.PICTURE = MyPics.MyPic
> THISFORM.REFRESH()
> ENDPROC
>ENDDEFINE
>
>
nancy -
good advice to store pix external and use path spec to point to them.
and like the way you demonstrated your technique.
one question ... and maybe i'm just overlooking something ...
in CREATEOBJECT, you passed a parameter 'TEMP.PRG' but never reference
it in INIT. just force of habit ??
(does the good nancy / bad nancy represent a multiple personality
disorder ? <g>)
patrick