By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,203 Members | 1,383 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,203 IT Pros & Developers. It's quick & easy.

List and Text Boxes

P: n/a
I have a list box and a text box. I have populated the list box with
names of reports from the tblTable1.RptList column.

I want to be able to click on one report (in the list box), and have
that report's description (from the tblTable1.RptDescription column)
appear in the textbox.

Essentially, I know I have to put the tblTable1.RptDescription column
name in the Control Source of the textbox (frmForm1.txtRptdescription).
Problem is I can't seem to get this to work. I have seen examples of
this where I have clicked on the textbox Control Source and I see a
list of the columns from a table. Anyone know how this is suppose to
work?

Marcus
*******

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi
You Can Give Qry With "Like" Or "="
Eg.
" Select tblTable1.RptDescription from tblTable1 Where
tblTable1.RptList =' " & listbox.selected Or Listbox.text & "'"

for more Be Free to Contact :
sa*******@gmail.com

Nov 13 '05 #2

P: n/a

"Marcus" <to*******@yahoo.ca> schreef in bericht news:11*********************@f14g2000cwb.googlegro ups.com...
I have a list box and a text box. I have populated the list box with
names of reports from the tblTable1.RptList column.

I want to be able to click on one report (in the list box), and have
that report's description (from the tblTable1.RptDescription column)
appear in the textbox.


Marcus,
Make sure the rowsource of your listbox (name = lstReportList) has TWO columns.
e.g. RptName and RptDescription. (You could use the wizard if needed)
Properties: Set width for second column to 0; e.g. ColumnWidth: 6cm;0cm
The controlSource for your textbox needs to be: = [lstReportList].Column(1)
Each time you select a Report in the list, the textbox will be updated.

Also: Loop up 'Column' in the Help

--
Hope this helps
Arno R

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.