Results 1 to 5 of 5

Thread: Problem populating MSFlexGrid *** Resolved ***

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2002
    Location
    Cordova, TN
    Posts
    60

    Unhappy Problem populating MSFlexGrid *** Resolved ***

    I'm writing a program for my department at work and its almost like 2 programs in one. Instead of using a seperate table for each one i'm using a single table and added a LogType field to distinguish between the 2. My problem is that when i try to populate the MSFlexGrid it's just blank. Here's my code, i'm using 2 radio buttons:
    VB Code:
    1. Dim intRSCounter As Integer
    2.     Select Case Index
    3.         Case 0
    4.             rsFilter.Open "SELECT * FROM CMELNRN WHERE LogType = 'CMEL'", cnCMELNRN, adOpenStatic, adLockOptimistic, adCmdText
    5.             With msgCMELNRN
    6.                 .Rows = rsFilter.RecordCount + 1
    7.                 For intRSCounter = 1 To rsFilter.RecordCount
    8.                     .Row = intRSCounter
    9.                     .Col = 0
    10.                     .Text = rsFilter!AnalystName
    11.                     .Col = 1
    12.                     .Text = rsFilter!InputDate
    13.                     .Col = 2
    14.                     .Text = rsFilter!TimeStarted
    15.                     .Col = 3
    16.                     .Text = rsFilter!Comments
    17.                     .Col = 4
    18.                     .Text = rsFilter!Event
    19.                     .Col = 5
    20.                     .Text = rsFilter!TimeEnded
    21.                     .Col = 6
    22.                     .Text = rsFilter!ClosingAnalyst
    23.                     .Col = 7
    24.                     .Text = rsFilter!EventStatus
    25.                     .Col = 8
    26.                     .Text = rsFilter!Contact
    27.                     rsFilter.MoveNext
    28.                 Next intRSCounter
    29.             End With
    30.             rsFilter.Close
    31.         Case 1
    32.             rsFilter.Open "SELECT * FROM CMELNRN WHERE LogType = 'NRN'", cnCMELNRN, adOpenStatic, adLockOptimistic, adCmdText
    33.             With msgCMELNRN
    34.                 .Rows = rsFilter.RecordCount + 1
    35.                 For intRSCounter = 1 To rsFilter.RecordCount
    36.                     .Row = intRSCounter
    37.                     .Col = 0
    38.                     .Text = rsFilter!AnalystName
    39.                     .Col = 1
    40.                     .Text = rsFilter!PersonContacted
    41.                     .Col = 2
    42.                     .Text = rsFilter!InputDate
    43.                     .Col = 3
    44.                     .Text = rsFilter!TimeStarted
    45.                     .Col = 4
    46.                     .Text = rsFilter!RequiredContact
    47.                     .Col = 5
    48.                     .Text = rsFilter!Comments
    49.                     .Col = 6
    50.                     .Text = rsFilter!Issue
    51.                     rsFilter.MoveNext
    52.                 Next intRSCounter
    53.             End With
    54.             rsFilter.Close
    55.     End Select

    Can anyone tell me why the grid isn't populating and also how i can get it to work? Thanks.
    Last edited by IceBreakerG; Jul 27th, 2003 at 02:15 PM.
    How come it's a penny for your thoughts, but you have to put your 2 cents in? Somebody's makin' a penny

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width