What is the line right before the FETCH NEXT doing? This is the only part that looked strange to me. I've used arrays of types in a similar manner before without problems.
-----Original Message----- From: Terry McDonnell [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 18, 2005 11:13 AM To: [EMAIL PROTECTED] Subject: MI-L Save me from pulling the rest of my hair out Hi List It's one of those "wish I had another programmer looking over my shoulder" problems. I have a table of census domain field names, and associated field captions, for use in a browse or combo, such that the user can understand what the domains are, e.g. "HHWITH1CAR" goes with "Householder with 1 car". "KIDSOFSCH1" goes with "Kids of school age" I put these into an array of TYPE (c.f. 2-D array) via the code below. But for some magic reason the array isn't getting filled with the correct values. e.g. the 1st element may have the 1st rec in the table, but the rest may be a repetition of the the 2nd rec, or indeed just of the 1st rec. I can't see anything wrong with the code - can you? Or is there something perculiar about type arrays? 'ppreciate it Terry McDonnell ----------- code follows: Dim I, lnNumRecs as SmallInt Select * from MICenAPFld where AP_ID = tnAP_ID into csrCenAPFlds Order by AP_Fld_ID lnNumRecs = TABLEINFO( "csrCenAPFlds", TAB_INFO_NROWS) ReDim gaAPFlds( lnNumRecs) ReDim gaAPFldCaps( lnNumRecs) Fetch First From csrCenAPFlds For I = 1 to lnNumRecs gaAPFlds( I).AP_ID = csrCenAPFlds.AP_ID ' Analysis profile ID gaAPFlds( I).AP_Fld_ID = csrCenAPFlds.AP_Fld_ID ' Analysis profile field ID gaAPFlds( I).AP_FieldName = csrCenAPFlds.AP_FieldNa gaAPFlds( I).AP_FieldCapt = csrCenAPFlds.AP_FieldCa gaAPFldCaps( I) = gaAPFlds( I).AP_FieldCapt ' Just the field capt for user select combo gaAPFlds( I).AP_FieldCapt Fetch Next From csrCAPInstcs Next --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 18368 ______________ This communication (including all attachments) is intended solely for the use of the person(s) to whom it is addressed and should be treated as a confidential AAA communication. If you are not the intended recipient, any use, distribution, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately delete it from your system and notify the originator. Your cooperation is appreciated. --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 18371
