• Clearing Data Entry Form on New choice (2007)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Clearing Data Entry Form on New choice (2007)

    Author
    Topic
    #454242

    I have a data entry form to enter student’s in a class. There is an unbound combo box with all the classes and the form i set for data entry so that it opens with only a blank record to add students.
    BUT- how can I get it after I finish the first class entry, and choose the next class from the combo box to go back to a blank form to start adding the next class?
    I am sure there is a simple way to do his, but I am stumped
    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1127056

      Depends a bit on exactly how you have done it.

      Is the form set to only show students enrolled in the selected class? In that case me.requery should do what you want. You could put that in the after update event of the combo.

      • #1127063

        The form opens in data entry so it does not show the existing records. When I enter a student in the form, the after update code pulls the class from the unbound combo box and enters the class in the underlying table. I want to get to a data entry form each time I choose a different class in the unbound combo box

        • #1127064

          If the form data source is query that uses the combo as a parameter, then existing records would disappear after a requery.

          The easiest way to do it though is to use a form and subform. Combo box on the main form, data entry on the subform, and have them linked by a master/child field.
          Then what you want will happen automatically, and the class will be entered automatically without any code.

          • #1127067

            You are correct, but there are some other things being done when they are entered into the class which is why I did it this way, I might have to change it to main subform, depending which issue is more significant to the person doing data entry.
            Thanks

    Viewing 0 reply threads
    Reply To: Clearing Data Entry Form on New choice (2007)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: