Results 1 to 7 of 7
  1. #1
    MissLotus is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    10

    Last entry to open by default

    Hi,



    I am creating a basic d/b for work and have a general knowledge to get me by.
    I have created 2 forms. 1 - is the main page that has a command button that links to the second page. This main page is open by default.
    What I want to happen is when they click the command button the 2nd form will open, but it will open to the last (most recent) entry.
    I know I can set by default to have a blank entry to open on default "Data Entry - yes" but that doesn't give me the option to view past entry.

    Any suggestion would appreciated.

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Do you have a Field that contains the date when a Record is created? Or a Numeric ID that increases with each Record created?

    Linq ;0)>

  3. #3
    MissLotus is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    10
    Ling - Yes I do, I have a field that is numeric and increases as each new data is entered.

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Before we over complicate things, is the 'last Record' actually the last record that is displayed, as you move through the Form? If so, placing this in the secondary Form will take you to that Record:

    Code:
    Private Sub Form_Load()
     DoCmd.GoToRecord , , acLast
    End Sub


    Linq ;0)>

  5. #5
    MissLotus is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    10
    Thanks heap's! That did it's trick.

    For some reason, when I go to new entry or last entry, the page will appear in the middle of the screen. How do I get it to go to the top of the screen again?I must have changed something.

    Out of curiosity (off the topic), with the codes you have posted or any codes, do you create them somehow in access or is it something you taught yourself?

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by MissLotus View Post

    ...For some reason, when I go to new entry or last entry, the page will appear in the middle of the screen...
    Can't really wrap my head around your explanation; think you'll have to ZIP your file and post it here, for us to look at.

    Quote Originally Posted by MissLotus View Post

    ...Out of curiosity (off the topic), with the codes you have posted or any codes, do you create them somehow in access or is it something you taught yourself...
    After programming in two languages, I went back to college and took some classes, including an 'Introduction to Access' class. After discovering that the instructor was reading directly from the text, and frequently skipping pages, I reported him to the department head and withdrew from the class. Everything since then has been self-taught, and, to be honest, that's how most of us learn a given language with any degree of competency. Classes can only lead you so far. The real learning is in the nitty-gritty of 'doing!'

    Linq ;0)>

  7. #7
    MissLotus is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    10
    Hi Ling,

    Here is a print screen of what I mean (sorry couldn't figure out how to upload the file on here)
    When form opens.doc
    I hope it makes sense, if not, that is ok, I will figure it out.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 07-20-2013, 03:59 AM
  2. Default Value - Last Entry
    By jnb22019 in forum Programming
    Replies: 3
    Last Post: 04-20-2012, 08:14 AM
  3. default form to open when executing mdb
    By kkukreja in forum Forms
    Replies: 1
    Last Post: 02-09-2011, 09:19 AM
  4. Replies: 4
    Last Post: 01-27-2010, 12:39 PM
  5. Replies: 1
    Last Post: 02-10-2007, 10:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums