Click here to Skip to main content
15,889,335 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Is VB.Net under-rated? Pin
markrlondon13-Apr-20 11:27
markrlondon13-Apr-20 11:27 
AnswerRe: Is VB.Net under-rated? Pin
Mycroft Holmes28-Feb-20 11:22
professionalMycroft Holmes28-Feb-20 11:22 
GeneralRe: Is VB.Net under-rated? Pin
markrlondon13-Apr-20 11:28
markrlondon13-Apr-20 11:28 
QuestionVB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Member 1186689325-Feb-20 2:39
Member 1186689325-Feb-20 2:39 
AnswerRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Richard MacCutchan25-Feb-20 3:07
mveRichard MacCutchan25-Feb-20 3:07 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Member 1186689325-Feb-20 3:18
Member 1186689325-Feb-20 3:18 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Richard MacCutchan25-Feb-20 3:33
mveRichard MacCutchan25-Feb-20 3:33 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Member 1186689325-Feb-20 3:32
Member 1186689325-Feb-20 3:32 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Richard MacCutchan25-Feb-20 3:37
mveRichard MacCutchan25-Feb-20 3:37 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Member 1186689325-Feb-20 6:37
Member 1186689325-Feb-20 6:37 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Richard MacCutchan25-Feb-20 6:43
mveRichard MacCutchan25-Feb-20 6:43 
GeneralMessage Closed Pin
25-Feb-20 6:55
Member 1186689325-Feb-20 6:55 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Eddy Vluggen25-Feb-20 8:02
professionalEddy Vluggen25-Feb-20 8:02 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
phil.o25-Feb-20 8:18
professionalphil.o25-Feb-20 8:18 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Richard MacCutchan25-Feb-20 8:18
mveRichard MacCutchan25-Feb-20 8:18 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Eddy Vluggen25-Feb-20 8:44
professionalEddy Vluggen25-Feb-20 8:44 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Richard MacCutchan25-Feb-20 8:49
mveRichard MacCutchan25-Feb-20 8:49 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Eddy Vluggen25-Feb-20 12:19
professionalEddy Vluggen25-Feb-20 12:19 
GeneralRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Richard MacCutchan25-Feb-20 21:09
mveRichard MacCutchan25-Feb-20 21:09 
QuestionRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
ZurdoDev28-Feb-20 6:55
professionalZurdoDev28-Feb-20 6:55 
AnswerRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
phil.o25-Feb-20 8:24
professionalphil.o25-Feb-20 8:24 
AnswerRe: VB.NET/MS ACCESS Saving today's date produces 2020-02-25 08:28:00.946341400 Pin
Mycroft Holmes25-Feb-20 11:44
professionalMycroft Holmes25-Feb-20 11:44 
QuestionVB.NET/MS ACCESS Display data from query Pin
Member 1186689321-Feb-20 3:05
Member 1186689321-Feb-20 3:05 
I have a textbox that I need to run this query when the value changes for the textbox.

VB
Private Sub tbStudentID2_TextChanged(sender As Object, e As EventArgs) Handles tbStudentID2.TextChanged
    mySql = "SELECT DateDiff('d', [DateofRank], [currentDate]) FROM StudentData"
    ConnDB()
    myCommand = New OleDbCommand(mySql, myConnection)
    myCommand.ExecuteNonQuery()
    myRead = myCommand.ExecuteReader
    Do While myRead.Read = True
        tbDays.Text = myRead(0).ToString()
    Loop
End Sub


86 is display no matter which record I choose. I think it is just retrieving the first record in the in the table.

I want to display the number of days since a student has tested by subtracting DateofRank from currentDate. I am open to other ideas on how to achieve this.
AnswerRe: VB.NET/MS ACCESS Display data from query Pin
Richard Deeming21-Feb-20 3:40
mveRichard Deeming21-Feb-20 3:40 
GeneralRe: VB.NET/MS ACCESS Display data from query Pin
Member 1186689321-Feb-20 4:10
Member 1186689321-Feb-20 4:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.