After update reset form (1 Viewer)

cktcPeterson

Member
Local time
Yesterday, 19:44
Joined
Mar 23, 2022
Messages
73
Hello

I have a main form frmStudentCheckIn and a subform frmSubCheckin and a field [Select Course]

Currently, I have a combo box in the form header where students can select their name and then on the subform can select the course they are taking.
I need help with- After they select their course I want to return the combo box and clear it for the next person.

Thanks!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 20:44
Joined
Aug 30, 2003
Messages
36,125
Presuming the form is bound try using GoToRecord to move the main form to a new record and SetFocus to move focus to the combo.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:44
Joined
Oct 29, 2018
Messages
21,471
Hi. Welcome to AWF!

Are you able to post a screenshot of your forms?
 

Eugene-LS

Registered User.
Local time
Today, 06:44
Joined
Dec 7, 2018
Messages
481
After they select their course I want to return the combo box and clear it for the next person.
Code:
Private Sub SubFormCourseSelection_EventName()
    '... Saving selected data ...
    '...
    ' return the combo box and clear it for the next person
    Me.Parent.Form.ComboBoxStudentName = Null
    Me.Parent.Form.ComboBoxStudentName.SetFocus
    Me.Requery
End Sub
Don't forget to replace the name of the event and the combo box with the real ...
 

Users who are viewing this thread

Top Bottom