Weird Hide Control Behavior - Help Please

jdesmm

Well Known Member
A user wants us to add a field for time entry to an application (P3711) that will then be written to a user reserved field in the table. I have added two fields - one called Time Stamp - Entry based on data dictionary item TDAY and one called Time Stamp - Formatted, based on data dictionary item FTIME. I want the user to be able to enter the time without having to format it themselves (and also because I will be saving the time in a field like TDAY).

I added the following code to the Time Stamp - Entry Control Exited/Changed-Inline event:

// Format time entered and display in Formatted control, then hide this control
Format Time With Colons
// FC Time Stamp - Entry --> mnTimePassedIn
// FC Time Stamp - Formatted <-- szFormattedTime
Set Control Focus(FC Code Date)
Show Control(FC Time Stamp - Formatted)
Hide Control(FC Time Stamp - Entry)

I added the following code to the Time Stamp - Formatted Control is Entered event:

// User wants to edit time stamp - change focus to entry field
Show Control(FC Time Stamp - Entry)
Set Control Focus(FC Time Stamp - Entry)
Hide Control(FC Time Stamp - Formatted)

When I run the program and enter a time into the Time Stamp - Entry control and tab to the next field, I'm getting an Invalid Overwrite or Read error. The debugger shows that this occurs on the line where the control is hidden. Even with the error, the program goes ahead and hides the control and shows the properly formatted time in the Formatted control.

I've tried moving the Hide Object command to a different control's event and setting focus on that control from the Time Stamp - Entry's code, but that causes the same error. I've even tried it from the Post Dialog is Initialized, and it generates the same error. Finally, thinking it might be an issue with that control, I tried adding code to hide other pre-existing fields from the Post Dialog is Initialized event. All generate the same error. It just seems like I am unable to hide any control from any event.

I have also tried testing this on a different machine and then even in a different environment, where the only modification I made was to add a HideControl statement in the post dialog event for a pre-existing field. Same thing. Since I have other applications where I have done this sort of activity with a problem, including a recent custom app, this is very weird, and since it is multi-environment, multi-workstation, I'm wondering if the app is corrupt?

What could be happening here? I will probably go ahead and log a case with PS/Oracle, but just wondering if anyone else has encountered a problem like this or has any ideas on fixing/working around it.
 
Back
Top