If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
DAO Recordset FindFirst HELP
Im getting this very annoying error and cant figure it out for the life
of me. basically on the masternum.findfirst(criteria) line, it throws an error that states... "Run-time error '3436' data type mismatch in criteria expression" ive checked all my tables to make sure the data types are correct and nothing is different. if ANYONE can help, it would be great. thankyou. Do Until upcnum.EOF upc = upcnum!UPCCase criteria = "[CustNbr] = '" & num & "' AND [UPCCase] = '" & upc & "'" masternum.FindFirst (criteria) If masternum.NoMatch() Then final.AddNew final!num = num final!case = UPCCase final.Update End If upcnum.MoveNext Loop |
#2
|
|||
|
|||
DAO Recordset FindFirst HELP
If you open your table in design view, what data types are CustNbr and
UPCCase? If number, lose the extra quotes: criteria = "([CustNbr] = " & num & ") AND ([UPCCase] = upc & ")" You may also be able to see what is wrong if you: Debug.Print criteria just before the FindFirst. When it fails, check what came out in the Immediate Window (Ctrl+G). -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Brandon Johnson" wrote in message ups.com... Im getting this very annoying error and cant figure it out for the life of me. basically on the masternum.findfirst(criteria) line, it throws an error that states... "Run-time error '3436' data type mismatch in criteria expression" ive checked all my tables to make sure the data types are correct and nothing is different. if ANYONE can help, it would be great. thankyou. Do Until upcnum.EOF upc = upcnum!UPCCase criteria = "[CustNbr] = '" & num & "' AND [UPCCase] = '" & upc & "'" masternum.FindFirst (criteria) If masternum.NoMatch() Then final.AddNew final!num = num final!case = UPCCase final.Update End If upcnum.MoveNext Loop |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Performance: FindFirst, FindNext vs Open New Recordset | Danny J. Lesandrini | General Discussion | 4 | December 22nd, 2005 10:41 PM |
passing a recordset | 85ascMcLaren | Setting Up & Running Reports | 1 | August 6th, 2005 04:16 PM |
ASP recordset as SQL table | Ennex | Database Design | 8 | March 5th, 2005 06:38 PM |
Porting Access DB to ASP; use recordset as SQL table? | Ennex | Running & Setting Up Queries | 1 | March 4th, 2005 12:27 AM |
How to loop through a recordset and update the field of a recordset or delete current record | Karen Middleton | Running & Setting Up Queries | 1 | January 4th, 2005 10:30 AM |