Wrox Programmer Forums
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 1st, 2008, 03:42 AM
Registered User
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Change Datagrid Column Value

This is my code

      Set rs = New ADODB.Recordset
       rs.Open "SELECT id,name,address,male FROM members", cn, 1, 3, 1

       Set grdData.DataSource = rs

It's okay but now the column "Male" just show -1 and 0
I want this column will display "Male" or "Female"

I tried this
      If rs.Fields("male")=Yes Then

      grdData.Columns("male").Text   = "Male"


      grdData.Columns("male").Text   = "Female"

      End If

But it don't work..

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting column name/header of a datagrid elygp ASP.NET 1.0 and 1.1 Professional 2 June 6th, 2007 01:07 PM
How to change the color of list control's column gemini Visual C++ 1 August 28th, 2006 12:58 AM
Row to Column Change...Urgent..!!!!!!!!!!! rajukurian SQL Language 2 May 20th, 2005 05:11 PM
change font is template column Raif General .NET 0 July 28th, 2004 02:41 PM
SQL to change a column name in MS Access nidgep Classic ASP Databases 1 August 13th, 2003 10:52 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.