Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2008
    Posts
    101

    Unanswered: Go to record help

    I have a calendar type form setup which has one record per date, i manually added all the dates up until the end of this year, but what i would like is it to open on todays date rather than the first record in the table....i dont want a filter for today because i still want access to all the other days to plan things until the end of the year but i cant get my head around how i would do this?

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    use a filter
    then when you want to look at other days apply another filter
    if you want to look at all days remove the filter
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I wouldn't use a table to store dates like that. There is no need to store it, the computer has a calendar built in.

    I'd make controls on the form to update a text box that has the date in it, those controls should update the form's returned data based on that date.

    Your Form Open events would set that textbox to Date().
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Sep 2008
    Posts
    101
    thing is i have to have the dates preplanned as we schedule a few months ahead. and if i use the =Date() function it will change the date upon enter every day....this means there will be no way to go back and check what the schedules were and what are they going to be,

  5. #5
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580
    I think more information would be helpful;

    How many tables are their?
    What are the field names / datatypes?
    Is the form based on a query?
    If so what is the SQL?
    What controls are on the form?
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you probably need a production calendar which identifiesw what dates a working dates.. sounds complicated.. doesn't need to be

    ive used on in the past that takes the form of

    Year | Month | Day1 | Day 2 | Day 3 |...... | Day 31
    2008 | 01 | 0000 | 0000 | 0001 |..... | 0022
    2008 ! 02 | 0023 | 00024 | 0024 | 0024

    create an index on the 1st day of the month, optionally on the day 31 column. should make finding the date quicker.

    you store an integer indicating the next working day for that date

    ie
    M 1 day one of our calendar
    T 2 day two
    W 3
    T 4
    F 5 day 5
    S 6 non working day so increment the counter (points to th enext working day
    S 6 non working day but don't increment the counter
    M 6 working day (one more than Friday)
    T 7 etc......

    when you have a holiday mid week then that day becomes non working so it and subsequent dates drop one.

    you need a couple of functions
    one to retrieve to retrieve the working day for a specified date
    one to retrieve the date of a specified working day (find the first occurance of the number)
    you need a program to maintain the calendar.. of course you culd type each number in but its kin boring and kin prone to error

    say you have a job that kicks off on March 23rd 2008, whose day number id 34, to find the projected completion date add the duration to that integer and then find the date for that number

    you do need to roll out your calendar at least (say) twice the expected duration.. but Id create the calendar for say 2..5 years ahead
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Oct 2008
    Posts
    3

    Go to new record

    If you wish to make your form automatically give you new page for posting when you open it then make a macro and give action “go to record” then select from properties “go to new record” after that save it and open the form then apply this macro on the form’s option “load on opening”



    Shadow Stewart

    Social Bookmarking Service

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    ▲ Wow, a "NEW" macro. That solves everything.

    Stop spamming forums with crap tbh. Mods should remove every link he puts in a post.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  9. #9
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Quote Originally Posted by Shadow Stewart
    If you wish to make your form automatically give you new page for posting when you open it then make a macro and give action “go to record” then select from properties “go to new record” after that save it and open the form then apply this macro on the form’s option “load on opening”



    Shadow Stewart

    Social Bookmarking Service
    Shadow - how does your response relate to the original question?
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    He doesn't care...
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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