Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Apr 2008
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Autofill a field when adding a new record - Access 2007

    I have a "continuous forms" form page. When I click on the new record at the bottom of the lists of records, I would like the database to automatically fill in the first field of the new record with the same info that is in the same field in the previous record.

    For example: I have a field called StudentNumber. On a screen for a student, that field has the same number in it is all the records that appear on this queried form. When I go to the new record, I want the same student number to appear automatically in the new record.

    Thanks for the help.

    Paul

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Here is a Microsoft Article on this subject.

    But it might be possible to do it more simply. Depends on just what you are doing
    If you have multiple records for the one student, and you have a screen for that student, with a continuous subform for the multiple records, then the link master and child properties would fill in the student number automatically.

    If you don't have a form/subform, you could still have the student number in the form header, then set the default value for student numnber to the displayed number in the header.
    Regards
    John



  3. #3
    2 Star Lounger
    Join Date
    Apr 2008
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, John

    I used one of your approaches to make the form work the way I want it to work.

Posting Permissions

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