Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 1st, 2008, 03:42 AM
Registered User
 
Join Date: Aug 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Change Datagrid Column Value

This is my code

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
Code:
      If rs.Fields("male")=Yes Then

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

      Else

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

      End If

But it don't work..

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:01 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.