Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box filtering problem

Status
Not open for further replies.

liltechy

Programmer
May 17, 2002
145
US
I have a combo box with the following code and I get an error "You have canceled the previous operation" and I don't understand why. Can someone please help?

'I/O lookup
Private Sub List20_AfterUpdate()
' Find the record that matches the control.
Dim strSQLSF As String

List21 = Null

strSQL = "SELECT DISTINCT qryafehdr2.[Name] FROM qryafehdr2 "
strSQL = strSQL & " WHERE qryafehdr2.[Internal Order Number] = '" & List20 & "'"
strSQL = strSQL & " ORDER BY qryafehdr2.[Name];"

List21.RowSource = strSQL

strSQLSF = "SELECT * FROM qryafehdr2 "
strSQLSF = strSQLSF & " WHERE qryafehdr2.[Internal Order Number] = '" & List20 & "'"

Forms![Executive Look-Up Form]![Invoice_Header_Total_Exec subform1].LinkChildFields = "Internal Order Number"
Forms![Executive Look-Up Form]![Invoice_Header_Total_Exec subform1].LinkMasterFields = "Internal Order Number"
Me.RecordSource = strSQLSF
Me.Requery
End Sub


liltechy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top