i have a database which is a food menu. i have successfully display on the picture box. However, i cant copy all the content in the picture box to the text box. i hava code but only display the last sentence...
hope to getting help here ^_^

here is my code

Private Sub Command6_Click()
 Picture2.Cls

     Data1.Recordset.MoveFirst
     Do While Not Data1.Recordset.EOF
     Picture2.Print Data1.Recordset!
     Text5.Text = Data1.Recordset!
     Data1.Recordset.MoveNext
    Loop
End Sub

Private Sub Form_Load()
    Data1.DatabaseName = App.Path & "\menu1.mdb"
    Data1.RecordSource = "Table1"
    Data1.Refresh

    Text1.DataField = "Code"
End Sub

Recommended Answers

All 5 Replies

Hi,

Change this:

Text5.Text = Data1.Recordset!

To this :

Text5.Text = Text5.Text & " " & Data1.Recordset!

Be carefull there is a limitation to the size of data that can be held in a textbox (64k)
If u want to view all the data in textbox, set this property MultiLine = True

Regards
Veena

Thank you very much. Can display already^_^
One more question is how can i display the data in different line. If i use the code you provided for me, all data is display in one line.

i got it le. Thank you

Hi,

use:

Text5.Text = Text5.Text & vbCrLF & Data1.Recordset![code]

Regards
Veena

Thanks you very much^^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.