Need help filtering then saving

P

pokdbz

I have a form that I filter on using:
Me.Filter = "[SSN] = '" & SSN & "'"
Me.FilterOn = True
Me.Refresh

then I want to change some of the information and then I click my save
button. It saves the information but it also puts in another record of the
same SSN but with all blank records. How can I eliminate this extra record?
 
L

Larry Linson

You haven't given us enough information. Generally, there is no need for a
SAVE button on a bound Access form because the data is saved automatically
when you move off the main form to a subform, or move from one record to
another, or close the form.

If you can save multiple records with the same unique identifier, you need
to examine your specifications for Primary Key (SSN, in your case?). If you
make that a primary key, or an index requiring unique values, the database
engine will not allow duplicates.

Larry Linson
Microsoft Access MVP
 
Top