Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Mar 2004
    Thanked 0 Times in 0 Posts

    New record, view previous records (2003)

    Hi, I have a form that opens in "continuous forms" view and can have code in the On Open event to move to a new record via "DoCmd.GoToRecord , , acNewRec".

    The problem here is that only the new record is displayed in the detail section, any previous records have scrolled up and so not visible to the user. This creates a degree of confusion for some users who, without realising they could scroll up, think there are no records in the form. I am looking for a tidy way to have as many records visible as practical in the space available. One method involves something like the following lines:
    DoCmd.GoToRecord , , acLast
    DoCmd.GoToRecord , , acPrevious, 10
    DoCmd.GoToRecord , , asNewRec

    Which will display the last 10 records and put the focus in the new record. This only works if there are more than 10 records! Is there a better way of doing this so that I don't have to specify the offset (10 in this example) and I display as many records as will fit in the space available? Or, to trap the error so that if there aren't enough records, that it moves some lesser number?

    Cheers, Roger

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: New record, view previous records (2003)

    See if you can use the idea from my last reply in the thread that begins at <post:=740,337>post 740,337</post:>.

Posting Permissions

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