0

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

Edited by mike_2000_17: Fixed formatting

2
Contributors
5
Replies
6
Views
10 Years
Discussion Span
Last Post by nuinaifen128
0

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

Edited by mike_2000_17: Fixed formatting

0

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.

0

Hi,

use:

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

Regards
Veena

Edited by happygeek: fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.