Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Error      5      'selecteddates' is not a member of 'System.Windows.Forms

Posted on 2012-08-10
12
Medium Priority
?
635 Views
Last Modified: 2012-08-13
Hi Experts

I keep getting the following error on this code. Please help

   If Me.CboSignDates.Text = "btwn" Then
                    If Me.Calendar1.selecteddates.count < 1 And Me.Calendar2.selecteddates.count < 1 Then
                        Me.LblError.Text = "please make a selection from both calendars!"
                        Exit Sub
                    End If
                    ssql = "select * from performance where [date] >= '" & Me.Calendar1.selecteddates & "' and [date] <= '" & Me.Calendar2.selecteddate & "'"
               Else
                    If Me.Calendar1.selecteddates.count < 1 Then
                        Me.LblError.Text = "please make a selection from the first calendar!"
                       Exit Sub
                   End If
                    ssql = "select * from performance where [date]" & Me.CboSignDates.Text & "'" & Me.Calendar1.selecteddate & "'"
                End If

Open in new window


Error      5      'selecteddates' is not a member of 'System.Windows.Forms.MonthCalendar'.      C:\Users\Graham\Dropbox\LIMS_Dev\LIMS1\FrmPerformanceEditor.vb      51      24      LIMS1
0
Comment
Question by:GrahamSA
  • 6
  • 4
  • 2
12 Comments
 
LVL 35

Accepted Solution

by:
YZlat earned 1000 total points
ID: 38281924
Windows form calendar control does not have SelectedDates method, only Web Forms
0
 

Author Comment

by:GrahamSA
ID: 38281943
Hi Friend
I figured as much, the original code for this is off my companies website.
How would I ammend this code to run?
0
 
LVL 35

Expert Comment

by:YZlat
ID: 38281997
What type of control is Calendar1?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 35

Expert Comment

by:YZlat
ID: 38282000
and are you using Windows application or Web application?
0
 
LVL 35

Expert Comment

by:YZlat
ID: 38282006
disregard the first question. Duh:0
0
 

Author Comment

by:GrahamSA
ID: 38282029
:)
I am trying to reproduce a Web application in Windows Forms.
I have the web project files which were left by the companies Developer.

very new to all this but will no doubt get it right...
0
 
LVL 35

Expert Comment

by:YZlat
ID: 38282031
If you are using Windows application, you can't really select multiple dates with MonthlyCalendar control
0
 
LVL 35

Expert Comment

by:YZlat
ID: 38282033
0
 

Author Comment

by:GrahamSA
ID: 38282125
Check this out, this is an explanation of what I am trying to do. Before I got the code from our developer.

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL_Server_2008/Q_27823785.html

Here is the web form which works perfectly.
http://imslesedi.co.za/Editing.aspx
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38283865
There are selectionstart and selectionend properties on this control.
0
 

Author Comment

by:GrahamSA
ID: 38283888
Cool that sounds like a plan,
How to find or use them and Ill have a go
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 1000 total points
ID: 38283992
As I suggested in your other question, DateTimePickers would be more suitable as you will get more screen real estate to show the results.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question