Quick question!

I am a student who is trying to finish a final project, but I am incredibly stuck at one seemingly simple step. I have a number of text boxes on a tabbed form that will have information typed in by the user. I am then supposed to have the user click on a command to add the information to a MSFlexGrid. I cannot seem to figure out how to do this. I have tried AddItem to no avail : MSFlexGrid1.AddItem txtStateTaxRate for example. Any suggestions??
hefnertaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LewyCommented:
Do you get any errors?
0
Éric MoreauSenior .Net ConsultantCommented:
I had always use MSFlexGrid bounded. So add your data to your recordset and refresh your grid.
0
hefnertaAuthor Commented:
No, no errors at all.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Erick37Commented:
Use:
MSFlexGrid1.AddItem txtStateTaxRate.Text

Also make sure you have
Option Explicit
as the first line of your code, before anything.  This will prevent you from using unDimmed variables.  If the program cannot find txtStateTaxRate, it will tell you.
0
vbWayneCommented:
Works for me

MSFlexGrid1.AddItem "Wayne"
MSFlexGrid1.AddItem Text1


0
hesCommented:
Dim GridRow
Dim RowCount
 
 GridRow = 0
 MSFlexGrid1.Rows = GridRow + 1
 MSFlexGrid1.Row = GridRow
 MSFlexGrid1.Col = 0
 MSFlexGrid1.Text = txtStateTaxRate
 MSFlexGrid1.Col = 1
 MSFlexGrid1.Text = txtNextData
0
vbWayneCommented:
an afterthought...
If you use multiple forms you have to
add  
MsFlexGrid1.AddItem FormWhatever.txtStateTaxRate
0
halapayaCommented:
Try this way

Private Sub MsFlexGrid1_Click ()
   MSHFlexGrid1.Additem 'adds a row
  ' Put text in third row, third column.
   MSHFlexGrid1.Col = 2
   MSHFlexGrid1.Row = 2
   MSHFlexGrid1.Text = "There"
End Sub

also u can use

MSHFlexGrid1.TextMatrix(1, 1) ="blah"

here it'll add blah, to row=1 col=1

First you have to add a row using
Additem method, then use either
TextMatrix(row,col) or set the row and col first and then use the Text method

hope this helps.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.