Results 1 to 5 of 5
  1. #1
    CAJ is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    3

    Form-how not to get the data of previous record

    Hi,


    Ive made a form. The form has quite a few combo boxes in it based on tables. A big problem that I cant seem to solve is that when I enter a new record in the form, it remebers and pre-filles the value of the previous record in the combo boxes. I have tried several things like default value in the table as well as in the form but this does not fix the problem. My form is quite useless when it prefills the values from previous records. Any one a idea on how to solve this??

  2. #2
    tdecker81 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    23
    requery all of them in the oncurrent event. Give it a try and let me know.

  3. #3
    CAJ is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    3
    Thanks so much for reply! Just not sure what you mean with 'requery them all'. Would you mind explaining.

  4. #4
    tdecker81 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    23
    open the form in design view. with the form object selected click on events. Near the top of the list you should find the on current event. Click in that box and then click the ... and then pick code
    in the code block once it opens type

    me.comboboxID.requery

    replace comboboxID with the name of each combo box and repeat the code until you've listed all of your combo boxes.

    Then give it a try.

  5. #5
    CAJ is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    3
    AWESOME!!! Fixed it! So happy. Thanks heaps!

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

Similar Threads

  1. Replies: 8
    Last Post: 07-06-2013, 05:13 PM
  2. Replies: 1
    Last Post: 07-25-2011, 09:41 AM
  3. Replies: 2
    Last Post: 11-04-2009, 09:45 PM
  4. Add data from previous record if blank
    By mbc321 in forum Queries
    Replies: 1
    Last Post: 08-08-2009, 05:15 PM
  5. using value from previous record
    By dollars in forum Queries
    Replies: 0
    Last Post: 12-10-2008, 03:30 PM

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