Link to home
Start Free TrialLog in
Avatar of hefnerta
hefnerta

asked on

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??
Avatar of Lewy
Lewy

Do you get any errors?
Avatar of Éric Moreau
I had always use MSFlexGrid bounded. So add your data to your recordset and refresh your grid.
Avatar of hefnerta

ASKER

No, no errors at all.
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.
Works for me

MSFlexGrid1.AddItem "Wayne"
MSFlexGrid1.AddItem Text1


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
an afterthought...
If you use multiple forms you have to
add  
MsFlexGrid1.AddItem FormWhatever.txtStateTaxRate
ASKER CERTIFIED SOLUTION
Avatar of halapaya
halapaya

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial