944,057 Members | Top Members by Rank

Ad:
Sep 24th, 2007
0

using calendar picker from Microsoft calendar control 8.0

Expand Post »
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..
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
nuBudDy is offline Offline
32 posts
since Aug 2007
Sep 24th, 2007
0

Re: using calendar picker from Microsoft calendar control 8.0

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.
Reputation Points: 10
Solved Threads: 16
Posting Whiz in Training
plusplus is offline Offline
207 posts
since Jul 2007
Sep 24th, 2007
0

Re: using calendar picker from Microsoft calendar control 8.0

There is also something called monthview, maybe that's what you need?
Reputation Points: 10
Solved Threads: 16
Posting Whiz in Training
plusplus is offline Offline
207 posts
since Jul 2007
Sep 24th, 2007
0

Re: using calendar picker from Microsoft calendar control 8.0

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
Reputation Points: 10
Solved Threads: 0
Light Poster
nuBudDy is offline Offline
32 posts
since Aug 2007
Sep 24th, 2007
0

Re: using calendar picker from Microsoft calendar control 8.0

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.
Reputation Points: 10
Solved Threads: 16
Posting Whiz in Training
plusplus is offline Offline
207 posts
since Jul 2007
Sep 24th, 2007
0

Re: using calendar picker from Microsoft calendar control 8.0

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
Reputation Points: 10
Solved Threads: 0
Light Poster
nuBudDy is offline Offline
32 posts
since Aug 2007
Sep 25th, 2007
0

Re: using calendar picker from Microsoft calendar control 8.0

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
Reputation Points: 10
Solved Threads: 0
Light Poster
nuBudDy is offline Offline
32 posts
since Aug 2007
Sep 25th, 2007
0

Re: using calendar picker from Microsoft calendar control 8.0

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
Reputation Points: 10
Solved Threads: 16
Posting Whiz in Training
plusplus is offline Offline
207 posts
since Jul 2007
Sep 25th, 2007
0

Re: using calendar picker from Microsoft calendar control 8.0

i got it.thanx a lot plusplus
Reputation Points: 10
Solved Threads: 0
Light Poster
nuBudDy is offline Offline
32 posts
since Aug 2007
Feb 7th, 2011
0

setting a military time

hello there I would like to ask on how can set a military time with hours/min./sec. using visual basic. because I needed it for my project can you please give a detail code to program it. please send me your reply... thanks for the big help! =)
godbless..
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ask_girl is offline Offline
1 posts
since Feb 2011

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Inventory System
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Datagrid Columns





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC