B
Bill H via AccessMonster.com
I have a simple form with a listbox(SelectScreen) that shows all names and
social security numbers in the database. I use this list to select the
correct name and open another form(MainScreen) for data input. Everything
works great except one thing. Right now I only have 3 people in the database
for testing purposes and here's what my listbox looks like:
111111111 John Doe
222222222 Jane Smith
333333333 Betty Sue
Now when I select "Betty Sue" the form opens properly and I can edit and Save.
But, when I open the listbox again for another selection the first record's
SSN changed to the last record that was accessed as such.
333333333 John Doe
222222222 Jane Smith
333333333 Betty Sue
Private Sub SelectIndividual_Click()
If Not IsNull(Me!SSN) Then
DoCmd.OpenForm "MainScreen", , , "SSN = """ & Me!SSN & """"
DoCmd.Close acForm, "SelectScreen"
End If
End Sub
Any ideas?
Bill
social security numbers in the database. I use this list to select the
correct name and open another form(MainScreen) for data input. Everything
works great except one thing. Right now I only have 3 people in the database
for testing purposes and here's what my listbox looks like:
111111111 John Doe
222222222 Jane Smith
333333333 Betty Sue
Now when I select "Betty Sue" the form opens properly and I can edit and Save.
But, when I open the listbox again for another selection the first record's
SSN changed to the last record that was accessed as such.
333333333 John Doe
222222222 Jane Smith
333333333 Betty Sue
Private Sub SelectIndividual_Click()
If Not IsNull(Me!SSN) Then
DoCmd.OpenForm "MainScreen", , , "SSN = """ & Me!SSN & """"
DoCmd.Close acForm, "SelectScreen"
End If
End Sub
Any ideas?
Bill