I have to try to read between the lines here. Are you talking about trying to define a compound key with five member fields and some of the keys could be null? (That's what it sounds like.)
As long as the text fields are fairly short you can do this with something simple.
Suppose the table is called tblMain and the five fields are stA, stB, stC, stD, and stE. The form's text boxes are tbA, tbB, tbC, tbD, and tbE.
I don't know where you would want to put this, but here is a way to do this...
Dim loRecs As Long
Dim stQry As String
stQry = "[stA]=""" & Nz(tbA,"") & """ and [stB]= """ & Nz(tbB,"") & """ and [stC] = """ & Nz(tbC,"") & """ and [stD] = """ & Nz(tbD,"") & """ and [stE] = """ & Nz(tbE,"") & """"
loRecs = DCount( "[stA]", "tblMain", stQry )
After this statement, loRecs contains either 0 or the number of records for which all five fields match the ones on the form.
If loRecs > 0 then
MsgBox "Duplicates found: " & CStr(loRecs), vbOKOnly, "Cannot save this record"
End If
What else you do kind of depends on where you do it. But in a BeforeUpdate routine, you can do a Cancel on the update event.