G
Guest
In a order style form i have created the following in the afterupdate of a
combobox (PartName) to populate another field (Combo22):
Private Sub PartName_AfterUpdate()
'On Error GoTo Err_PartName_AfterUpdate
Dim strFilter As String
strFilter = "[Part] = " & Me![PartName]
Me!Combo22 = DLookup("PartNo", "Parts", strFilter)
Exit_PartName_AfterUpdate:
Exit Sub
Err_PartName_AfterUpdate:
MsgBox Err.Description
Resume Exit_PartName_AfterUpdate
End Sub
The problem is i get error 2001 "You canceled the previous operation". Whats
confusing me also, is that if i change [Part] to a different field called
[No] and change its row source to [No], it works fine. This is the structure
of the table: [No] - Autonumber, [Part] - Text, [PartNo] - Text.
I'm sure its not currption as i have rewritten the whole lot in a new
database and it does the same. Any help much appreciated
TIA
Rico
combobox (PartName) to populate another field (Combo22):
Private Sub PartName_AfterUpdate()
'On Error GoTo Err_PartName_AfterUpdate
Dim strFilter As String
strFilter = "[Part] = " & Me![PartName]
Me!Combo22 = DLookup("PartNo", "Parts", strFilter)
Exit_PartName_AfterUpdate:
Exit Sub
Err_PartName_AfterUpdate:
MsgBox Err.Description
Resume Exit_PartName_AfterUpdate
End Sub
The problem is i get error 2001 "You canceled the previous operation". Whats
confusing me also, is that if i change [Part] to a different field called
[No] and change its row source to [No], it works fine. This is the structure
of the table: [No] - Autonumber, [Part] - Text, [PartNo] - Text.
I'm sure its not currption as i have rewritten the whole lot in a new
database and it does the same. Any help much appreciated
TIA
Rico