Link to home
Create AccountLog in
Avatar of al4629740
al4629740Flag for United States of America

asked on

Check if a column name exists in DataGrid

Weird question:

When I pull up a recordset within my datagrid, using vb6, I would like to check to see if the first column is named 'Test'

Initially I pull up the recordset like this
select * from Table1

Open in new window


Using DataGrid1 = rec    I pull up the records into a DataGrid.  How can I test to see if the first column is named 'Test'

How can I accomplish this?
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

If DataGrid1.Columns(0).Caption = "Test" Then...
ASKER CERTIFIED SOLUTION
Avatar of eemit
eemit
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Did any of the above help you?
Avatar of al4629740

ASKER

Yes I just tried it.  Thanks!