Results 1 to 2 of 2

Thread: Oldest Date

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2021

    Oldest Date


    I am starting to write a program to allocate equipment to customers on a first come first serve basis. I am using an Access DB to store customer details. When a customer makes a request their details and and the date of application are stored on the DB. When a piece of equipment becomes available I would like the user to click a button and then the program selects the oldest date in the table so that the details can be used else where in the program.

    Can anyone help me with this. I have done a bit of programming in the past but this is my first program involving a DB. I am still sketching out the program so I don't have any relevant code to share. I have searched online but cant find anything that helps.

    Many Thanks in advance

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Sydney, Australia

    Re: Oldest Date

    This is really a SQL question. You can use SELECT TOP 1 to get the first record in a result set so you simply need to query your table and sort by the date column in ascending order to make the oldest date the first record. If you don't know how to write SQL code, you should work through a basic tutorial. There's a link to one in my signature below. If you don't know how to write ADO.NET code in VB then you should do some research on that too. There's a Database FAQ link in my signature that provides data access information on this very site, including my own ADO.NET code examples.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width