S
steve-russell
I dont know why I am having so much problems with this. I cant find an
example anywhere.
I have a datagrid and I want to fill it using two textboxes, one with
start date and the other with end date. I've even tried to Dim
variables for the txtStartDate.Text and txtEndDate.Text and placed them
where the ? are but when I run it a green bar highlights the
..Fill(DataSet11) below and stops but I can place my cursor on the
variable and see the content (ie #3/12/2006# and #3/22/2006#) but will
not fill the datagrid.
The textboxes are named txtStartDate and txtEndDate
Me.OleDbSelectCommand1.CommandText = "SELECT Fname, Lname, Company,
EventName, EventDate FROM MasterDB WHERE (EventDate > ?) AND (EventDate
< ?)"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
OleDbDataAdapter1.SelectCommand.Parameters("EventDate").Value =
txtStartDate.Text
OleDbDataAdapter1.SelectCommand.Parameters("EventDate").Value =
txtEndDate.Text
OleDbDataAdapter1.Fill(DataSet11)
Steve
(e-mail address removed)
example anywhere.
I have a datagrid and I want to fill it using two textboxes, one with
start date and the other with end date. I've even tried to Dim
variables for the txtStartDate.Text and txtEndDate.Text and placed them
where the ? are but when I run it a green bar highlights the
..Fill(DataSet11) below and stops but I can place my cursor on the
variable and see the content (ie #3/12/2006# and #3/22/2006#) but will
not fill the datagrid.
The textboxes are named txtStartDate and txtEndDate
Me.OleDbSelectCommand1.CommandText = "SELECT Fname, Lname, Company,
EventName, EventDate FROM MasterDB WHERE (EventDate > ?) AND (EventDate
< ?)"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
OleDbDataAdapter1.SelectCommand.Parameters("EventDate").Value =
txtStartDate.Text
OleDbDataAdapter1.SelectCommand.Parameters("EventDate").Value =
txtEndDate.Text
OleDbDataAdapter1.Fill(DataSet11)
Steve
(e-mail address removed)