hello
please i need help!!
i have 7 forms in my windows application and the 7th form,only have a datagridview that has been populated from a bounded database. one of the columns in the datagridview contains date, so i need to check if the date in the column is today,then send a message! however i got the code to do all that but no button to trigger the send. it didnt send. i put the code in the form7 load event. please is there a way to make it execute without the use of button??

tanks for any idea

Recommended Answers

All 7 Replies

You'll need to post up some code. Without seeing whta you have done it is hard to give advice. The form load can call any other code it is told to, no button press required so you may have a fault in your logic.

Dim i As Integer
Dim a As String

For i = 0 To SheduleTBLDataGridView.Rows.Count - 1
'TextBox1.Text = SheduleTBLDataGridView.Item(3, i).Value
a = SheduleTBLDataGridView.Item(2, i).Value.ToString()
If a = Now.Date.ToString() Then


'the messaging code

End If

Next
End Sub

i helps loop thru the datagridview colume "date"
a is the date gotten from the date column in the datagridview..

Dim i As Integer
Dim a As String

For i = 0 To SheduleTBLDataGridView.Rows.Count - 1
'TextBox1.Text = SheduleTBLDataGridView.Item(3, i).Value
a = SheduleTBLDataGridView.Item(2, i).Value.ToString()
If a = Now.Date.ToString() Then


'the messaging code

End If

Next
End Sub

i helps loop thru the datagridview colume "date"
a is the date gotten from the date column in the datagridview..

Is your datacolumn which is having the date is of format now.date.tostring()??

datatime2 format of microsoft sql server 2008 r2

in a vb.net tutorial i read something like these "The Load statement loads a form into memory, but does not display it. When you code the Load statement for a form, the Form_Load event of that form will be triggered. The syntax is:

Load formname"

if i could use something like these to make sure that the code in my form7 load event is executed, maybe it might work?? but the syntax is not working!!

well you can also try a timer for this , if you use timer then also there is no need to press a button .

Regards

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.