I think there's an easy way to do this but I just can't seem to think this morning...
In FP 2.6 I had created a date stamp hot key using F12. If a user was in a date field that was empty they could simply press the F12 key and it would put the current date in the field. The ON KEY LABEL command called a procedure with the following code...
procedure stampit
if type(objvar(_curobj))="D"
thisvar=objvar(_curobj)
if ''=alltrim(dtos(&thisvar))
&thisvar=date()
endif
endif
return
Now I want to do the same thing in VFP but objvar and curobj don't seem to want to work. I'm sure there's a better more OOP approach to this but I just can't seem to think of one.
Any ideas would be much appreciated!