Hey all! First post here.. Here is my background: I have a dataGrid in vb.NET that is populated by a SQL statement that selects records by DATE (from user input in vb). Now... I want to add a 'Next Date' button that will run a SQL statement to find the next DATE and then display the records, and then repeat. My current string to get the first set of records from the user inputted DATE is here: Dim strTimeByDate As String = "SELECT Hours.Datewrk, Employee.Lastname, Employee.Firstname, Employee.EmployNo, Hours.Hourswrk, Hours.typewrk, Hours.formwrk, Hours.class, Hours.brate, PurchaseOrder.Descr, PurchaseOrder.Purchord, Hours.TicketNo FROM Hours As Hours INNER JOIN PurchaseOrder As PurchaseOrder ON Hours.Purchord = PurchaseOrder.Purchord INNER JOIN Employee As Employee ON Hours.EmployNo = Employee.EmployNo WHERE Hours.Datewrk = '" & txtDate1.Text & "' And PurchaseOrder.JobNo = '" & cboJobNo1.Value & "' ORDER BY Employee.Lastname, Employee.Firstname"
Now how do I structure a query to just go down the row of DATES and get the next available one? Soo I should be able to view records from 6/14/04 then hit the button, and it finds the next records are from 6/18/04, and so on. Thank you all for any guidance!