Click here to Skip to main content
15,884,298 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
AnswerRe: VB.NET/MS ACCESS Display data from query Pin
Member 1186689321-Feb-20 4:39
Member 1186689321-Feb-20 4:39 
QuestionVB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
Member 1186689320-Feb-20 4:14
Member 1186689320-Feb-20 4:14 
AnswerRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
ZurdoDev20-Feb-20 4:23
professionalZurdoDev20-Feb-20 4:23 
GeneralRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
Member 1186689320-Feb-20 4:44
Member 1186689320-Feb-20 4:44 
AnswerRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
ZurdoDev20-Feb-20 5:28
professionalZurdoDev20-Feb-20 5:28 
AnswerRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
Richard MacCutchan20-Feb-20 4:58
mveRichard MacCutchan20-Feb-20 4:58 
GeneralRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
Member 1186689320-Feb-20 5:39
Member 1186689320-Feb-20 5:39 
GeneralRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
Dave Kreskowiak20-Feb-20 7:13
mveDave Kreskowiak20-Feb-20 7:13 
GeneralRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
Member 1186689320-Feb-20 5:42
Member 1186689320-Feb-20 5:42 
QuestionHow to create new DateTime of months, going back 12 months Pin
jkirkerx17-Feb-20 8:32
professionaljkirkerx17-Feb-20 8:32 
AnswerRe: How to create new DateTime of months, going back 12 months [it works] Pin
jkirkerx17-Feb-20 8:52
professionaljkirkerx17-Feb-20 8:52 
AnswerRe: How to create new DateTime of months, going back 12 months Pin
Richard Deeming18-Feb-20 2:20
mveRichard Deeming18-Feb-20 2:20 
GeneralRe: How to create new DateTime of months, going back 12 months Pin
jkirkerx18-Feb-20 7:18
professionaljkirkerx18-Feb-20 7:18 
GeneralRe: How to create new DateTime of months, going back 12 months Pin
Richard Deeming18-Feb-20 7:42
mveRichard Deeming18-Feb-20 7:42 
QuestionHOW TO CREATE RDLC REPORT AND CALL IN VS 2013 Pin
Member 146289475-Feb-20 0:39
Member 146289475-Feb-20 0:39 

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.