i have try the method u taught me but it still cannot work.
this is what i have written for my code.
s = "SELECT Sum([Balance]+[Quantity]) AS Total FROM Customer_Table INNER JOIN Customer_Account_Table ON Customer_Table.NRIC = Customer_Account_Table.NRIC GROUP BY Customer_Table.NRIC HAVING (((Customer_Table.NRIC)='" & [Forms]![Form1]![txtNRIC] & "') AND ((Customer_Table.Name)='" & [Forms]![Form1]![txtName] & "'));"
You are trying to do something that can't be done ... string searching in access is not case sensitive so your search would retrieve NONO NOno noNO NoNo nOnO and all the other permutations ... That is by design. What you can do is retrieve the records and apply string comparisons to reject those that do not exactly match ... Try looking at the InStr function and specifically the vbBinaryCompare option.