The recordset is not updateable. This recordset cannot be updateable, so
any ideas on what to do?
I was thinking about setting the query criteria to the control on the form,
but I need four different dropdown boxes to allow finding records by
different fields:
Cust PO
Our Oder NO
Item NO
BOL NO
What you might want to do is to first use DLookUp or a recordset to
check, and only open the form if there are records. For example:
Dim strCrit As String
strCrit = "TRUE"
If Not IsNull(Me![Cust PO] Then
strCrit = strCrit & " AND [Cust PO] = " & Me![Cust PO]
End If
If Not IsNull(Me![Our Oder No] Then ' sic - should be Order?
strCrit = strCrit & " AND [Our Oder No] = " & Me![Our Oder No]
End If
If Not IsNull(Me![Item NO] Then
strCrit = strCrit & " AND [Cust PO] = " & Me![Item NO]
End If
If Not IsNull(Me![BOL NO] Then
strCrit = strCrit & " AND [BOL NO] = " & Me![BOL NO]
End If
If IsNull(DLookUp("[Cust PO]", "yourtable", strCrit) Then
MsgBox "No orders found", vbOKOnly
Else
Me.Filter = strCrit
End If
John W. Vinson[MVP]