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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data grid question

Status
Not open for further replies.

ixian

Programmer
Jul 13, 2001
128
0
0
US
Hey all,

I have a datagrid(dbgDB).. I wish to add columns with captions for each column via command button(cmdANC).

Aaron

Fear is the mind killer!!!!!!
 
Here is the code you need

dim i as integer
'i = where you want to put your column
'if you want to put it in front you choose 0
'if you want it to the back of table: dbgDB.columns.count
dbgDB.Columns.Add (i)
dbgDB.Columns(i).Caption = "aha"

Hopes this helps

greetings

Mim
 
Let me state it like this

I have a dbgrid(dbgDB) and a command button(cmdANC) and a text box(txtCN)
For each time i click on the cmdbutton, i wish for a new column to be made with the name from the txtCN to appear.

Aaron Fear is the mind killer!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top