Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i input data in the listbox

Status
Not open for further replies.

Fujiko

Programmer
Dec 23, 2001
63
PH
hi need help again... (im like a baby, i hate being a newbie) how do i input contents in the listbox? and how do i create code when one content of the list is selected?? thank you mwah mwah to all.

fujiko
 
as far as i know listbox properties is set to readonly.
how can you input data into it unless you put a textbox on it.

 
If you just want to know how to fill the list box in the first place, there are almost too many ways. At least I can't keep them all straight in my mind. First you need to fill in the RowSourceType property to let the listbox know what sort of thingee to look for. It can be a table, coursor, a literal list of data, a file, a SQL statment, etc. Then the RowSource property tells the listbox what the name of the table, query, file, etc. is. Often you'll start off by leaving the RowSourceType at none until you've set up your data the way you want it. Then you fill in RowSourceType and RowSource and refresh the listbox or the form.

I'd suggest you create a practice form with just a list box and a commandbutton (and maybe a textbox if you want to practice the additem method. Then play with various possibilities until you feel confindent.

By the way, assuming you use your command button to set things in motion, put code in the click even like:

Code:
thisform.MyListbox.RowSourceType = 1
thisform.MyListbox.RowSource = "First value, Second value, Third Value"
thisform.refresh

Dave Dardinger
 
Hi
Right Click on the list box in the forms designer. In the popup, select builder and follow the builder.. go thru all its tabs.. you are sure to finish it succesfully and easily :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top