using calendar picker from Microsoft calendar control 8.0

Thread Solved

Join Date: Aug 2007
Posts: 32
Reputation: nuBudDy is an unknown quantity at this point 
Solved Threads: 0
nuBudDy nuBudDy is offline Offline
Light Poster

using calendar picker from Microsoft calendar control 8.0

 
0
  #1
Sep 24th, 2007
hi, i need help on calendar picker.i placed a calendar control on a form.once i click on any date,i want the date value to be inserted into fields in database.i tried searching for the codes bt what i got was a manually designed calendar by a programmer.is it possible to insert those codes in calendar control 8.0?do we need to do the codings manually when using this component?(microsoft calendar control 8.0)

thanks in advance..
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 189
Reputation: plusplus is an unknown quantity at this point 
Solved Threads: 16
plusplus plusplus is offline Offline
Junior Poster

Re: using calendar picker from Microsoft calendar control 8.0

 
0
  #2
Sep 24th, 2007
what exactly are you trying to do? Do you mean that the following doesn't work?
adodc1.recordset("datepicked") = calendar1.value
Last edited by plusplus; Sep 24th, 2007 at 2:16 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 189
Reputation: plusplus is an unknown quantity at this point 
Solved Threads: 16
plusplus plusplus is offline Offline
Junior Poster

Re: using calendar picker from Microsoft calendar control 8.0

 
0
  #3
Sep 24th, 2007
There is also something called monthview, maybe that's what you need?
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 32
Reputation: nuBudDy is an unknown quantity at this point 
Solved Threads: 0
nuBudDy nuBudDy is offline Offline
Light Poster

Re: using calendar picker from Microsoft calendar control 8.0

 
0
  #4
Sep 24th, 2007
i now realize that my main problem is : "i don't exactly know how to use it."
do u mean that by just placing the calendar control on the form, i can straight away use them without having to program anything n just call them with
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. adodc1.recordset("datepicked") = calendar1.value
when i click on certain date from calendar control, i want the value to be inserted into a field in database.how do i do that?

thanx again plusplus
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 189
Reputation: plusplus is an unknown quantity at this point 
Solved Threads: 16
plusplus plusplus is offline Offline
Junior Poster

Re: using calendar picker from Microsoft calendar control 8.0

 
0
  #5
Sep 24th, 2007
calendar.value
gives you the value of the date clicked
so in the click event of calendar do
adodc1.recordset("datepicked") = calendar.value
That's all
Like I mentioned before, there is also something that's called monthview, it's like the calendar but I think it looks nicer.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 32
Reputation: nuBudDy is an unknown quantity at this point 
Solved Threads: 0
nuBudDy nuBudDy is offline Offline
Light Poster

Re: using calendar picker from Microsoft calendar control 8.0

 
0
  #6
Sep 24th, 2007
hey, i think i'm using it,the monthview you said.i used this :
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
  2. booking_date = MonthView1.Value 'add values into a global variable for use in another form
  3. Unload Me 'unload the current form
  4. CR1.Show 'load another form (where global variable will be used)
  5. End Sub
and it worked well.thank you very much for your help plusplus
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 32
Reputation: nuBudDy is an unknown quantity at this point 
Solved Threads: 0
nuBudDy nuBudDy is offline Offline
Light Poster

Re: using calendar picker from Microsoft calendar control 8.0

 
0
  #7
Sep 25th, 2007
i have another thing to add.i want to detect whether date clicked falls on weekend or weekdays so that different form will be loaded.how do i retrieve "day" from the date clicked so i can check it?btw,here are my codes:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
  2. booking_date = MonthView1.Value 'add values into a global variable for use in another form
  3. Unload Me 'unload the current form
  4. //*If MonthView1.Value = saturday Or MonthView1.Value = sunday Then 'check if date falls on weekend
  5. CR2.Show 'load another form (where global variable will be used)
  6. Else
  7. CR1.Show
  8. End If
  9.  
  10. End Sub
thanx again in advance
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 189
Reputation: plusplus is an unknown quantity at this point 
Solved Threads: 16
plusplus plusplus is offline Offline
Junior Poster

Re: using calendar picker from Microsoft calendar control 8.0

 
0
  #8
Sep 25th, 2007
Select Case weekday(booking_date)'the function weekday gives you a number 1 sunday, 2 monday etc
Case 1,7
'if it's sunday or saturday
Case else
'if it's any other day
End Select
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 32
Reputation: nuBudDy is an unknown quantity at this point 
Solved Threads: 0
nuBudDy nuBudDy is offline Offline
Light Poster

Re: using calendar picker from Microsoft calendar control 8.0

 
0
  #9
Sep 25th, 2007
i got it.thanx a lot plusplus
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC