G
Guest
Can anybody tell me what i'm doin wrong with this code:
Private Sub PartName_AfterUpdate()
On Error GoTo Err_PartName_AfterUpdate
Dim strFilter As String
strFilter = "[PartName] = " & Me![PartName]
Me!PartNo = DLookup("PartNo", "Parts", strFilter)
Exit_PartName_AfterUpdate:
Exit Sub
Err_PartName_AfterUpdate:
MsgBox Err.Description
Resume Exit_PartName_AfterUpdate
End Sub
Its placed in the afterupdate of a combo box to update another combo box.
Originally it was copied from a simlar instance in my database which work
fine. But this gives the error message: "You canceled the previous
operation". Now i have looked up this error message in the forum and done
all the compacting a decompiling the few entries suggest. I have also started
a completely new data base and rewritten the code and all the tables and
forms from stratch. So i dont think it is corrupt. Any suggestions much
appreciated.
TIA
Rico
Private Sub PartName_AfterUpdate()
On Error GoTo Err_PartName_AfterUpdate
Dim strFilter As String
strFilter = "[PartName] = " & Me![PartName]
Me!PartNo = DLookup("PartNo", "Parts", strFilter)
Exit_PartName_AfterUpdate:
Exit Sub
Err_PartName_AfterUpdate:
MsgBox Err.Description
Resume Exit_PartName_AfterUpdate
End Sub
Its placed in the afterupdate of a combo box to update another combo box.
Originally it was copied from a simlar instance in my database which work
fine. But this gives the error message: "You canceled the previous
operation". Now i have looked up this error message in the forum and done
all the compacting a decompiling the few entries suggest. I have also started
a completely new data base and rewritten the code and all the tables and
forms from stratch. So i dont think it is corrupt. Any suggestions much
appreciated.
TIA
Rico