Hello Guys:
Although I’ve been a member of the Alpha Community for more than 15 years, I took a 1-year hiatus so I’m totally out of it. Things that were second nature only one year ago, seem almost foreign to me. It's amazing how quickly we forget things if we don't use them every day.
Anyway, I have an old customer who was running their application on Version 5 trouble free for years. However, they recently upgraded to version 7 and a script that was running perfectly under the old version is no longer working. After the upgrade, they get a subelement error when pushing the form button that runs the script.
My skills are very rusty. I can’t seem to figure out why this is happening. It’s a very complex script, however, the error is occurring at the very beginning of the script, long before anything complex happens. I may be wrong but I suspect that some of the pointer commands may have changed in Ver 7.
The Form where the script is located is based upon a table called tblMunHrs so there are no sets involved. I ran debug() and noted the error is a “Property Not Found, SubElement error” that occurs when the script tries to capture the values in the table's two Date Fields called First_Date and Last_Date. Those are the last two lines in the shortened version of the script below.
I left the debug() commands in the script. Here’s the first portion of the script which stops at the vDateFirst = T1.First_Date and vDateLast = T1.Last_Date lines. Does the solution stand out as something that changed in version 7?
Thanks,
Robert
Although I’ve been a member of the Alpha Community for more than 15 years, I took a 1-year hiatus so I’m totally out of it. Things that were second nature only one year ago, seem almost foreign to me. It's amazing how quickly we forget things if we don't use them every day.
Anyway, I have an old customer who was running their application on Version 5 trouble free for years. However, they recently upgraded to version 7 and a script that was running perfectly under the old version is no longer working. After the upgrade, they get a subelement error when pushing the form button that runs the script.
My skills are very rusty. I can’t seem to figure out why this is happening. It’s a very complex script, however, the error is occurring at the very beginning of the script, long before anything complex happens. I may be wrong but I suspect that some of the pointer commands may have changed in Ver 7.
The Form where the script is located is based upon a table called tblMunHrs so there are no sets involved. I ran debug() and noted the error is a “Property Not Found, SubElement error” that occurs when the script tries to capture the values in the table's two Date Fields called First_Date and Last_Date. Those are the last two lines in the shortened version of the script below.
I left the debug() commands in the script. Here’s the first portion of the script which stops at the vDateFirst = T1.First_Date and vDateLast = T1.Last_Date lines. Does the solution stand out as something that changed in version 7?
Thanks,
Robert
Code:
'---------------------------------------- Dim T1 as P Debug(1) T1 = table.current(1) '------------------------------------------- 'Establish the variables we will used to 'copy the current running totals from 'tblMunHrs to tblMunHrsPrev 'Initiate each value as zero '------------------------------------------- Dim Shared vDateFirst as D Dim Shared vLastDate as D vDateFirst = {} vDateLast = {} '-------------------------------------- 'Obtain the values of each variable from 'the current RunTot number in each area 'using table.current() which is tblMunHrs '---------------------------------------- [B][COLOR="Purple"]vDateFirst = T1.First_Date[/COLOR][/B] [COLOR="Purple"][B]vDateLast = T1.Last_Date[/B][/COLOR] debug(0)
Comment