PDA

Click to See Complete Forum and Search --> : 2 Questions......


Rose
Nov 28th, 1999, 12:46 PM
I have an image and a text on the form. I created a project that generates random pictures. Here is the below code in the form --

Private Sub Form_Load()

Randomize Timer
imgSign.Picture = LoadPicture(App.Path & "\sign" & Int(Rnd * 10) + 1 & ".jpg")

End Sub

But my question is how to select a random description(perhaps from a file), and it must match with the image.

i.e. the image randomly displays "cat, and the text randomly shows the definition of "cat" on the form .... it has to be matched with an image "cat"


I created the database in Access 97, and I got the code to define Word and Picture and Text

field name data type
word text
picture ole object
description memo

I added the data. And, the result are shown below
cat picture "cat" an animal....
dog picture "dog" an animal....
etc.

But, I have the code, and I ran the program.. it says, "Unable to bind to field or DataMember. "Picture". I used the Data Form Wizard to create a form using the Employeers from the NWind.mdb database --- includes the pictures. When I ran that frmEmployeers, I got the same error!! I did not understand what does it mean by "Unable to bind....!" Can anyone tell me??? Thanks in advance.

ROSE

msdnexpert
Nov 28th, 1999, 02:37 PM
Check this out
http://support.microsoft.com/support/kb/articles/Q191/1/03.asp

Rose
Nov 29th, 1999, 01:38 PM
I got my code working! Thanks so much for all of your help!