Ms Access Runtime Error 3070
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up VBA with Access runtime error 3070 up vote 1 down vote favorite I have a database with a multiple fields 3 of which are: ID which is an autonumber IDtype which is text COMPANY which is text as well with the variable: Dim rs As DAO.Recordset when I do rs.FindFirst on the table I get the following results rs.FindFirst "ID=367" -> code runs fine but this way only allows me to get that one specific record rs.FindFirst "IDtype='71'" -> code runs fine rs.FindFirst "COMPANY=XDRT" -> runtime error '3070': Access db engine does not recognize 'COMPANY' as a valid field name or expression (I also tried putting single quotes around XDRT and still same error) The only difference between COMPANY field and IDtype field is the format is set to "@" for the COMPANY field Any help on this would be much appreciated. Thanks in advance vba ms-access share|improve this question asked Nov 4 '13 at 22:34 user2382321 166 The correct syntax is: rs.FindFirst "COMPANY='XDRT'", have you tried it? –jacouh Nov 4 '13 at 22:52 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted As my comment noted, the correct syntax is: rs.FindFirst "COMPANY='XDRT'" , have you tried it? Moreover, you probably have error when creating DAO.Recordset. Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("MyTable", dbOpenDynaset) As such all the tree fields are selected: ID, IDtype and COMPANY. share|improve this answer answered Nov 5 '13 at 1:22 jacouh 4,53821529 I had tried the single quotes arround XDRT but I didn't put the field in the DAO.Recordset. Thanks very much –user2382321 Nov 5 '13 at 18:39 add a comment| up vote 0 down vote If Company has a datatype of Text, you need to use single quotes to search for a string in that case. Try this: rs.FindFirst "COMPANY='XDRT'" share|improve this answer answered Nov 4 '13 at 23:59 Johnny Bones 5,52332049 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Pos
Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked Posts Go to Page... Thread Tools Rate Thread Display Modes 12-02-2010, 04:43 PM #1 lmcc007 Newly Registered User Join Date: Nov 2007 Posts: 635 Thanks: 0 Thanked 0 Times in 0 Posts Error 3070 I have an unbound search field on my form that I am using to search for a company name, but I keep getting the following error message: An error was encountered Description: The Microsoft Office Access database engine does not recognize 'CompanyNameTitle' as a valid field name or expression. Error Number: 3070 All I am trying to do is search for a company name and if found go to that http://stackoverflow.com/questions/19778583/vba-with-access-runtime-error-3070 record. I have attached the database. Thanks for your help! Attached Files CoName.zip (27.9 KB, 115 views) lmcc007 View Public Profile Find More Posts by lmcc007 12-02-2010, 07:11 PM #2 vbaInet AWF VIP Join Date: Jan 2010 Location: U.K. Posts: 26,373 Thanks: 0 Thanked 2,403 Times in 2,372 Posts Re: Error 3070 Without opening the db I think the error is self explanatory. That field names doesn't exist in your form's record source. Check the spelling. Or http://www.access-programmers.co.uk/forums/showthread.php?t=202250 you're calling the field name in the wrong context. Explain your approach. vbaInet View Public Profile Find More Posts by vbaInet 12-02-2010, 07:18 PM #3 MarkK Super Moderator Join Date: Mar 2004 Location: Vancouver BC Posts: 6,377 Thanks: 4 Thanked 933 Times in 893 Posts The form frmCompany is based on the table tblCompany, which does not contain a field called CompanyNameTitle. This causes your .FindFirst to fail. Cheers, __________________ formerly known as lagbolt | Windows 7 | Access 2010 | Visual Studio 2013 | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | "Institutions have a vested interest in perpetuating the problems to which they are the solution." - Clay Shirky MarkK View Public Profile Find More Posts by MarkK 12-02-2010, 07:33 PM #4 lmcc007 Newly Registered User Join Date: Nov 2007 Posts: 635 Thanks: 0 Thanked 0 Times in 0 Posts Re: Error 3070 Quote: Originally Posted by lagbolt The form frmCompany is based on the table tblCompany, which does not contain a field called CompanyNameTitle. This causes your .FindFirst to fail. Cheers, Thanks lagbolt. What should I do different to get the search to work? lmcc007 View Public Profile Find More Posts by lmcc007
DriverDoc WinSweeper SupersonicPC FileViewPro About Support Contact Errors Troubleshooting › Runtime Errors › Microsoft Corporation › Microsoft Access › Error 3070 How To Fix Microsoft Access Error 3070 Error Number: Error 3070 Error Name:Microsoft Access Error 3070 Error Description: http://www.solvusoft.com/en/errors/runtime-errors/microsoft-corporation/microsoft-access/3070-microsoft-access-error-3070/ The Microsoft Office Access database engine does not recognize '|' as a valid field name or expression. Developer:Microsoft Corporation Software:Microsoft Access Applies to:Windows XP, Vista, 7, 8 Download NowWinThruster 2015 - Scan your PC for computer errors. Compatible with Windows 10, 8, 7, Vista, XP and 2000 Symptoms of Error 3070 "Error 3070" appears and crashes the active program window. Your PC frequently crashes with ms access Error 3070 when running the same program. “Microsoft Access Error 3070” is displayed. Windows runs sluggishly and responds slowly to mouse or keyboard input. Your computer periodically “freezes” for a few seconds at a time. These 3070 error messages can appear during program installation, while a Microsoft Corporation-related software program (eg. Microsoft Access) is running, during Windows startup or shutdown, or even during the installation of ms access runtime the Windows operating system. Keeping track of when and where your 3070 error occurs is a critical piece of information in troubleshooting the problem. Causes of Error 3070 Corrupt download or incomplete installation of Microsoft Access software. Corruption in Windows registry from a recent Microsoft Access-related software change (install or uninstall). Virus or malware infection that has corrupted Windows system files or Microsoft Access-related program files. Another program maliciously or mistakenly deleted Microsoft Access-related files. Runtime Errors such as “Error 3070” can be caused by a variety of factors, so it is important that you troubleshoot each of the possible causes to prevent it from recurring. Runtime Errors Knowledgebase Article ID: 125735 Article Author: Jay Geater Last Updated: 30-07-2016 Popularity: star rating here Download NowError Fix Learn More Tweet Recommendation: Scan your PC for computer errors. How To Fix Microsoft Access Error 3070 Below is a list of troubleshooting steps to resolve your Error 3070 problems. These troubleshooting steps get progressively more difficult and time consuming, so we strongly recommend attempting them in ascending order to avoid unnecessary time and effort. Please Note: Click the [ ] image to expand the troubleshooting instructions for e