G
Guest
I have a form that displays parts. I have a textbox where the user can type
in a part number and rather than only display that part (essentially filter),
I wanted to just go to that record. To do so, I am using the following code:
Private Sub txtPN_AfterUpdate()
DoCmd.ShowAllRecords
DoCmd.GoToControl "PN"
DoCmd.FindRecord Me.txtPN
Me.PN.SetFocus
End Sub
The source for my form is the table Parts.
My problem is that when the user locates a part using the above code, they
cannot edit the record. Actually, they can edit the record but the changes
will not save. If I scroll to the part number, I can edit the record and the
changes will be saved.
Is there something about the ShowAllRecords command that is causing this?
Is there a better way to do this? I've used this same code in other
applications but this is the first time I have encountered this problem.
Thanks in advance!
in a part number and rather than only display that part (essentially filter),
I wanted to just go to that record. To do so, I am using the following code:
Private Sub txtPN_AfterUpdate()
DoCmd.ShowAllRecords
DoCmd.GoToControl "PN"
DoCmd.FindRecord Me.txtPN
Me.PN.SetFocus
End Sub
The source for my form is the table Parts.
My problem is that when the user locates a part using the above code, they
cannot edit the record. Actually, they can edit the record but the changes
will not save. If I scroll to the part number, I can edit the record and the
changes will be saved.
Is there something about the ShowAllRecords command that is causing this?
Is there a better way to do this? I've used this same code in other
applications but this is the first time I have encountered this problem.
Thanks in advance!