I have a form in a database that I want the name of the user display in a text box when that user inputs their Person_Nbr and select a Month/year date. The source of the names are in the NAME field of the ppm table. Example when the user inputs 11111 as Person_Nbr the name that should display should be Melanie Davies in the Text box. Attached is the Database. Can you please help me accomplish this goal. I have tried different methods but I could not still get it to work. Thanks Database11.mdb
Microsoft Access
Last Comment
Chrisjack001
8/22/2022 - Mon
Rey Obrero (Capricorn1)
your db is working, when you enter the number in txtPerson and select a date from the combo box..
what is it that you want as an alternative?
Rey Obrero (Capricorn1)
you can try this,
Private Sub txtPerson_AfterUpdate()
Dim strsql
strsql = "Select * from ppm where person_nbr = " & Me.txtPerson
Me.RecordSource = strsql
End Sub
Chrisjack001
ASKER
I want the name of the Person associated with that Person_Nbr to display in the text box above
what is it that you want as an alternative?