473,396 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to connect date picker values to adodb?

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2. Dim EndDate, CurDate As Date
  3. Dim BusDay, TotBusDays, CalcYear As Integer
  4. TotBusDays = 1
  5. CurDate = DTPicker1.Value
  6. EndDate = DTPicker2.Value
  7. Do Until CurDate = EndDate
  8. BusDay = Format(CurDate, "w")
  9. Select Case BusDay
  10. Case "2" To "6"
  11. TotBusDays = TotBusDays + 1
  12. Case "1"
  13. 'Do nothing
  14. Case "2"
  15. 'Do nothing
  16. End Select
  17. CurDate = DateAdd("d", 1, CurDate)
  18. Loop
  19. If Check1.Value = vbChecked Then
  20. TotBusDays = TotBusDays - 1
  21. End If
  22. If Check2.Value = vbChecked Then
  23. TotBusDays = TotBusDays - 1
  24. End If
  25. If Check3.Value = vbChecked Then
  26. TotBusDays = TotBusDays - 1
  27. End If
  28. If Check4.Value = vbChecked Then
  29. TotBusDays = TotBusDays - 1
  30. End If
  31. If Check5.Value = vbChecked Then
  32. TotBusDays = TotBusDays - 1
  33. End If
  34. If Check6.Value = vbChecked Then
  35. TotBusDays = TotBusDays - 1
  36. End If
  37. If Check7.Value = vbChecked Then
  38. TotBusDays = TotBusDays - 1
  39. End If
  40. End Sub
  41.  
Aug 8 '12 #1
3 3112
kadghar
1,295 Expert 1GB
Sure, and your question is... ¿?

Check out the Microsoft DAO object library
Aug 8 '12 #2
i have inserted two datepicker in this form and make these values drop in the datebase using adodb connection.These values has to be shown as crossed one in the monthview calendar.How to do this one?
Expand|Select|Wrap|Line Numbers
  1. Dim esql As String
  2. Dim con As New ADODB.Connection
  3. Dim rs As New ADODB.Recordset
  4. 'show
  5. Private Sub Command1_Click()
  6. MonthView1.Value = "8/31/2012"
  7. MonthView1.MaxSelCount = 7
  8. MonthView1.SelStart = DTPicker1.Value
  9. MonthView1.SelEnd = DTPicker2.Value ' here you can put any other date 'like  format(date,"mm-DD-YY") and use datepicker values
  10. End Sub
  11. 'Add
  12. Private Sub Command2_Click()
  13. Adodc1.Recordset.AddNew
  14. Adodc1.Recordset.Fields(0) = DTPicker1.Value
  15. Adodc1.Recordset.Fields(1) = DTPicker2.Value
  16. Adodc1.Recordset.Update
  17. If Not Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveNext
  18. End Sub
  19.  
  20. Private Sub Form_Load()
  21. Set con = Nothing
  22. con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Yogi\Documents\Database1.mdb;Persist Security Info=False"
  23. Set rs = Nothing
  24. rs.Open "select * from tmaster", con, adOpenKeyset, adLockPessimistic
  25. If rs.BOF = True Or rs.EOF = True Then
  26. Exit Sub
  27. End If
  28. Set MSHFlexGrid1.DataSource = rs
  29. MSHFlexGrid1.Refresh
  30. End Sub
  31.  
.
Attached Images
File Type: jpg Untitled.jpg (20.6 KB, 325 views)
Aug 8 '12 #3
kadghar
1,295 Expert 1GB
I'm not sure how this datetime picker works, but i believe it can only cross today's date. Never the less, you can show any date as marked or selected. Check out its properties.
Aug 8 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Hussein Patwa | last post by:
Hi there. I'm new to this group. I'm also partially sighted so navigating the web is sometimes quite difficult. I'm looking for a javascript date picker, you know the ones that travel sites...
1
by: Jim Heavey | last post by:
Hello, I am trying to alter the default date format shown in the date picker control. I am using the "Custom Format" property and setting this value to "ddd M/d/yy", but this has no effect. What...
4
by: Rethish | last post by:
Hi All, I am developing an application in VB.net. I am using .Net Datetime picker control to manage the date. But I am not able to assign null/Empty value to the control. I found the property...
3
by: Jon Paal | last post by:
looking for date-picker which is made up of three dropdowns, month/day/year, which are interconnected to show correct combination upon change of any one dropdown. Should allow for multiple...
0
by: keithsimpson3973 | last post by:
Does anyone know if it is possible to display the value of a date picker control on a vb6 form that the user selected on an access report? I am using vb6 to display a report selection and it has a...
1
by: labise | last post by:
hi, my question is i have two date picker on the form datepicker1 and datepicker2 when i click on them will be query on the datagrid1 i connect via mysql, Private mysql As cMysql Private mrec As...
3
by: ramu | last post by:
Hi all, I created a date picker using java script in my asp.net 2005 application which is for the IE. But im trying to run my java script for date picker in mozilla but i cant. so could any...
1
by: vp.softverm | last post by:
hi all . Am facing problem with the date picker. when i click on date picker in a popup window. the date table is opened in the middle of the pop up window. and it is unable to scroll with...
1
by: Bobby | last post by:
Hi, I'm using Office 2007. I have a text field called txtDate which is formatted to medium date. This gives me the date picker when the control has the focus. I have several other text controls...
0
by: burledivya | last post by:
Hi Friends, Iam new to this forums. by the suggestion of my friend i came to know that this forum is very very good and we get a very good responses. iam new to .NET 3.5 , WPF, infragistics and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.