I'm in the middle of porting our main app to Delphi 6 and I came across this probem.
in Delphi 4, the following ran ok: if dbgrdBankAccounts.Field[Ord(bkBankNo) + 1].AsString = Company.sDefaultBankAccount then Under Delphi 6 I get an access violation. However, if I break it down into its component pieces, everything runs as it used to: intBankNo := Ord(bkBankNo) + 1; strBankAcc := dbgrdBankAccounts.Field[intBankNo].AsString; if strBankAcc = Company.sDefaultBankAccount then //we're ok...... Any ideas why this would happen? It's not a huge issue, but it does indicate a possible problem with the compiler unless I'm missing something obvious here. (This isn't my code BTW, I'm maintaining it *cries*) --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/