Thanks Dal. That works very well. That file that was uploaded in post 13 was the wrong one that I uploaded on accident. But, your code still works better than what I had.
Finally, I need to get that PartPOID from the PartPOInfoQuery. Currently, I am using the same method as with the other combo boxes, but it is not working.
Code:
Private Sub PONumbercbo_AfterUpdate() Me.PartPOIDcbo.Requery
'DoCmd.OpenQuery "PartPOInfoQuery", acViewNormal, acEdit
'Update PartPOIDcbo
Dim strSource As String
strSource = "SELECT PartPOInfoQuery.PartPOID " & _
"FROM PartPOInfoQuery " & _
"WHERE POInfoID = " & Me.PONumbercbo _
& " ORDER BY PartPOInfoQuery.PartPOID"
Debug.Print strSource
Me.PartPOIDcbo.RowSource = strSource
Me.PartPOIDcbo = vbNullString
End Sub
This way seems like it may not be the best anyways because it will not make it ONLY one PartPOID every single time (if a PONumber exists more than once).
I am assuming this is where the:
Code:
'txtPartPOID = Nz(DLookup([partPOID], "tblpartPO", "PartID = " & txtPartID & " AND POInfoID = " & txtPOInfoID), 0)
' then test txtPartPOID for zero to make sure you got a record rather than NULL...
will be used.
I still do not know how this statment is supposed to work, but I will try and figure it out.
Thanks again Dal!!
Just in case here is my current db: AccessForumFolder.zip