'No records in T_Output so needs to add first record Rst.FindLast ("DONOR_CONTACT_ID= 'strDonor1' AND ORDER_NUMBER= 'strOrderNum1'") 'Runs if temps have same DONOR_CONTACT ID If (strDonor1 = strDonor2) And (strOrderNum1 = strOrderNum2) Then 'Sets strRecip = RECIPIENT_CONTACT_ID FROM T_RECIPIENT_SORT 'strTemp2 = DONOR_CONTACT_ID from T_RECIPIENT_SORT 'sets strTemp1 to the first record of the DONOR_CONTACT_ID Set rstOutput = dbs.OpenRecordset("T_OUTPUT", dbOpenDynaset) 'rst refers to the table T_RECIPIENT_SORT Set rst = dbs.OpenRecordset("T_RECIPIENT_SORT", dbOpenDynaset) FindFirst ("DONOR_CONTACT_ID= 'strDonor1' and ORDER_NUMBER= 'strOrderNum1'") works correctly however. And the error is for this line: rst.FindLast ("DONOR_CONTACT_ID= 'strDonor1' AND ORDER_NUMBER= 'strOrderNum1'"). The error I get is "Data type mismatch in criteria expression". FindFirst and it works which is why I am confused. However, I use almost the same statement with. FindLast with multiple criteria it stopped working. FindLast to search for a specific record, and it was working with one criteria, but when I tried to use.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |