I have an accident claims form that I need to requery on one of three different fields.
Primary field is AccidentID
ClientName (Can appear on more than one AccidentID)
SolicitorsRef (unique to each accident claim but field can be null)
AccidentRefFinal (reference number for each claim)
from the main form, my comboboxes are:
cmbClientName and cmbAccRefFinal - These requery to find the requested data.
cmbSolRef, brings the required data plus all the nulls.
How can I avoid this to show only the record matching cmbSolRef.
Expand|Select|Wrap|Line Numbers
- SELECT tblPerson.Completed, Clients.ClientName, tblPerson.SolicitorsRef, tblPerson.AccidentID, tblPerson.AccidentRefFinal
- FROM Clients INNER JOIN tblPerson ON Clients.ContactID = tblPerson.ContactID
- WHERE (((Clients.ClientName) Like "*" & [Forms]![MMQ_Master_Client]![cmbClientName] & "*") AND ((tblPerson.SolicitorsRef) Like "*" & [Forms]![MMQ_Master_Client]![cmbSolRef] & "*" Or (tblPerson.SolicitorsRef) Is Null) AND ((tblPerson.AccidentID) Like "*" & [Forms]![MMQ_Master_Client]![cmbAccRefFinal] & "*"))
- ORDER BY tblPerson.Completed DESC;