Home All Groups Group Topic Archive Search About

db connections and text boxes

Author
17 Oct 2006 9:20 AM
si_owen
hi all

i have a db linked to a list box

what i also have is 2 text boxes which need to be populated from the db
via the list box.

the two records i need returning from the same table are question and
answer.

the first text box is populated by the question (when list box item
selected) using the following code:

               Me.TextBox1.Text = Me.ListBox1.SelectedItem.Text

however i need the code to populate the answer text box(text box 2)
from the db via the list box.

many thanks

simon

Author
17 Oct 2006 3:50 PM
rowe_newsgroups
> however i need the code to populate the answer text box(text box 2)
> from the db via the list box.

I'm afraid I don't understand what you're trying to say. Could you
elaborate on what exactly you wish to accomplish?

Thanks,

Seth Rowe


si_owen wrote:
Show quoteHide quote
> hi all
>
> i have a db linked to a list box
>
> what i also have is 2 text boxes which need to be populated from the db
> via the list box.
>
> the two records i need returning from the same table are question and
> answer.
>
> the first text box is populated by the question (when list box item
> selected) using the following code:
>
>                Me.TextBox1.Text = Me.ListBox1.SelectedItem.Text
>
> however i need the code to populate the answer text box(text box 2)
> from the db via the list box.
>
> many thanks
>
> simon
Author
18 Oct 2006 8:01 AM
si_owen
all done.

sorry if it was a bit ambigious

just created an sql connection and pulled data through.


cheers

simon