Deki Djokic wrote:
Drew,

Works as charm!!!
I do like 'faster approach' in 'Shipyard': delete from instead of searching in tFor_Confirmation table!
However, I'm not expert for SunBasic, but it seems to me that you missed a function call for Week-function. At least, it doesn't work on my Linux box and in 'BeforeInsert' event I can not find function call. How to do that in the SunBasic?
As far as I know there is no built in week function with OO.oBasic. Therefore I used the rather awkward example of calling an HSQL function from a basic statement. There is a Calc function that will return the week for a date variable, calling a Calc function from within a basic sub procedure is possible, but IMO, is just as awkward as the use of the HSQL function - but I suppose it would be more portable amongst OO.o users.

The other option would be to write an OO.oBasic function to create the value - now that I think of it, the basic function could just be a wrapper for the code needed to call the Calc function - it would be keeper for a toolkit I suppose...I think I can put that together for you.
Just thinking: could be more comfortable if it is possible to attach whole 'Week calculation' module to  'Text modified' and  'After updating'? events of Date Field. And, perhaps, in 'When loading' event of frmInspection1, for initial calculation? Just thinking...products of tired brain. Also in frmInspection1 field Week can not be 'read only' - sometime people are lazy to update their records immediately.
Well, myself I would not tend to store a value such as this - that way I avoid the situation where the two stored values might disagree. After all DBMS's are all about imposing rules, and insuring that those rules are met for any specific point in time.
Just thinking.
- Always a great thing to do -
Thanks for your time,

Deki

--

With best regards,

Drew Jensen

-- currently certifiable - MS Windows user since....oh gosh - forever - when it was spelled XEROX

Reply via email to