On Mar 16, 2011, at 10:07 AM, Peter wrote: > Hi Brian, > I've tried that but can't get the info into a variable > I thought it would be:- variable = Fn ButtonTextString$(_field) but that doesn't work variable just ends up blank. > Also I need to load previous files in and show the date from that file, and all I get is today's date. This shows how to retrieve the date from the date/time control. '-------------- local fn GetControlClockDate ( c as ControlRef, outDate as ^LongDateRec ) '~'1 dim as SInt32 buf dim as LongDateRec controlLongDate dim as OSStatus err long if fn GetControlDataSize( c, _kControlEditTextPart, _kControlClockLongDateTag, buf ) == _noErr err = fn GetControlData( c, _kControlEditTextPart, _kControlClockLongDateTag, sizeof(LongDateRec), @controlLongDate, buf ) if ( err == _noErr ) then BlockMoveData( @controlLongDate, outDate, sizeof(LongDateRec) ) // send data back to caller end if end fn dim as Rect r dim as LongDateRec cDate appearance window -1,"Show Date Control" SetRect( r, 208, 146, 320, 166 ) appearance button 1,, _kControlClockNoFlags,,,, @r, _kControlClockDateProc window 1 fn GetControlClockDate ( button&( 1 ), @cDate ) print "month = ";cDate.ld.month print "day = ";cDate.ld.day print "Year = ";cDate.ld.year RunApplicationEventLoop() '-------------- Brian S