Results 1 to 5 of 5

Thread: Go To Date

  1. #1
    Join Date
    Oct 2003
    Location
    London
    Posts
    341

    Unanswered: Go To Date

    Hi guys,

    I have a form that displays training course information for a particular day. On this form, at the moment the only way you can navigate to other dates would be using goto record First, previous, next and last...

    What I would like to do though is to be able to go to a specific date...
    Something like... go to first record where Date = x

    What I don't want to do is filter this information on the form so the form shows only records where the date = x.

    is anyone able to help with this?

    christyxo

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    anything against filters - it would be the easy solution - you can apply or remove filters easily enough

    The forms recordsource can be manipulated programtically, so just iterate through the records untill the required date is found. If the recordset can use the find first methods then its even easier

    assuming you have you text box containing a date, add a button called say cmdGoToDate
    when its pressed navigate through the recordset untill it matches the entered date

  3. #3
    Join Date
    Oct 2003
    Location
    London
    Posts
    341
    Nothing against filters but for this purpose I want it to remain showing everything but to just go to the specific record.

    I have thought about applying filters to go to the record and then removing the filter at the end of the vb code but I was wondering if there would be an easier and cleaner way of doing this.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Well the navigate through the recordset mentioned above is probably your best choice

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Going to a date.

    Would the docmd.FindRecord XXXX work (or docmd.FindRecord "#" & XXXX & "#")?
    Last edited by pkstormy; 01-10-06 at 14:58.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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