Hello gurus! i've been playing around with this for a while and after much searching I'm officially stumped. Okay, a little background: I'm very new to VBA but enjoy the experience of learning the method behind the coding and the language. I'm working on a db that will track students for a summer camp. One of my fields in my student records (CamperInfo) is "School". Currently, the field is set up as a combobox in the CamperInfo Subform in the FamilyInfo form. I would like the combobox to be able to add schools if the school is not listed by a pop-up when the "add school" (or whatever) is selected. I've played around with this bit of coding: (please no flames, I'm new!
)
As you might have guessed, it doesn't work. no errors, it just doesn't do anything. I added the "Schools" data to my table based on one post I studied but that didn't work like I had hoped. Any advice or help you can give me would be much appreciated.
thank you all!
J
Code:
Private Sub School_AfterUpdate()
On Error GoTo Err_School_AfterUpdate
Dim strForm As String
If Me.School = "Schools" = True Then
strForm = "Schools"
DoCmd.OpenForm Me.School
Err_School_AfterUpdate:
MsgBox Err.Description
End If
End Sub
As you might have guessed, it doesn't work. no errors, it just doesn't do anything. I added the "Schools" data to my table based on one post I studied but that didn't work like I had hoped. Any advice or help you can give me would be much appreciated.
thank you all!
J