Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Khurram Khan Khan
  Where is Khurram Khan Khan?
 Karachi
 Pakistan
 Khurram Khan Khan
 To: Kulwant Singh
  Where is Kulwant Singh?
 Shimla
 India
 Kulwant Singh
 Tags
Subject: RE: Calendar Control in VFP
Thread ID: 248804 Message ID: 248880 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Active X Controls & OLE Automation
Date: Thursday, December 24, 2009 9:14:46 AM         
   


kulwant can u solve this problem please check image
Highlight blank date in calendar form Image attached please check

Detail:
Calendar control class is used in this form.

**** highlight the button with green else white

select * from booking where Date == this.calendardate into cursor temp
scan
IF cncl="BOOKED"
this.backcolor = rgb(0, 128, 0)
ELSE
this.backcolor = rgb(236,233,216)
ENDIF

endscan


clearcalendar()

local i, x
i = 1
x = 1

for n = 0 to 43
if i < 7
ExecuteDate = "thisform.nDay" + ALLTRIM(STR(x)) + ALLTRI(STR(i)) + "." + "caption"
&ExecuteDate = ""
endif
if x = 7
i = i + 1
x = 0
endif
x = x + 1
endfor



Previewmonth() && Procedure
local i, x
i = 1
x = 1

this.clearcalendar()
ltDate = GOMONTH(DATE(2009, 01, 01), this.nMonthProp)

for n = 0 to 41
monthDate = ltDate + n
this.label1.caption = alltr(cmonth(ltDate)) + " " + alltr(transform(year(ltDate)))

if i < 7 and month(monthDate) == month(ltDate)
ExecuteDate = "thisform.nDay" + ALLTRIM(STR(DOW(monthDate))) + ALLTRI(STR(i)) + "." + "caption"
PutDate = "thisform.nDay" + ALLTRIM(STR(DOW(monthDate))) + ALLTRI(STR(i)) + "." + "calendardate"
verifyDate = "thisform.nDay" + ALLTRIM(STR(DOW(monthDate))) + ALLTRI(STR(i)) + "." + "verifydate()"
&ExecuteDate = ALLTR(STR(day(monthDate)))
&PutDate = monthDate
&verifyDate
endif
if DOW(monthDate) = 7
i = i + 1
x = 1
endif
x = x + 1
endfor


if Christian Tabligan online please check it last time you work on it.




> > Hi,
> >
> > I have used the Olecontrol for the calendar in VFP 6.0.
> >
> > I have a table where the books has a date and i have a form in which there are two calendars i.e from && to.
> > whenever i select a date FROM and date TO it has to get the details of the dates given in the form and should get the details from the table.
> >
> > I have tried to do but not able to get the details from the table..
> >
> > can any one help me.
> >
> > thnaks
> > sunil
>
> IMHO there could be an error at two places.
>
> 1. You are not getting/putting proper date values to the "FROM_DATE" and "TO_DATE" variables through the OLE "Calender Control"
>
> For example if you are using
>
select * from yourtable where yourtable.datefield >= FROM_DATE and yourtable.datefield <= TO_DATE

> Check to see if FROM_DATE and TO_DATE are VALID.
>
> OR
>
> 2. The error could be in the LINES of code you are using to get "Details" from the table.
> Can you post the code that you are using to extract details from the table?
>
> 3. It is also possible there is no data for that period in the Table
>
> kulwant
> (Help Save the TIGER. Save Wildlife. Live & let Live)

ENTIRE THREAD

Calendar Control in VFP Posted by sunil madhav @ 12/23/2009 1:32:31 PM
RE: Calendar Control in VFP Posted by ho me @ 12/23/2009 2:41:02 PM
RE: Calendar Control in VFP Posted by Yuri Rubinov @ 12/23/2009 2:58:17 PM
RE: Calendar Control in VFP Posted by sunil madhav @ 12/30/2009 12:29:27 PM
RE: Calendar Control in VFP Posted by Yuri Rubinov @ 12/30/2009 2:28:30 PM
RE: Calendar Control in VFP Posted by Jun Tangunan @ 12/23/2009 4:03:43 PM
RE: Calendar Control in VFP Posted by kulwant singh @ 12/23/2009 5:48:39 PM
RE: Calendar Control in VFP Posted by Khurram Khan Khan @ 12/24/2009 9:14:46 AM
RE: Calendar Control in VFP Posted by kulwant singh @ 12/24/2009 6:55:54 PM
RE: Calendar Control in VFP Posted by Khurram Khan Khan @ 12/25/2009 1:50:16 PM
RE: Calendar Control in VFP Posted by Khurram Khan Khan @ 12/26/2009 8:34:17 AM
RE: Calendar Control in VFP Posted by kulwant singh @ 12/26/2009 3:14:43 PM
RE: Calendar Control in VFP Posted by M. Akram Bhatti @ 12/30/2009 1:00:56 PM