Access 2007 Runtime Error 3070
Contents |
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 access 2007 runtime error 91 company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions
Access 2007 Runtime Error 2501
Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million access 2007 runtime error 3349 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 access 2007 runtime error 6 overflow 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
Access 2007 Runtime Windows 8
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,50821428 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 ans
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 access 2007 runtime trusted locations lmcc007 Newly Registered User Join Date: Nov 2007 Posts: 635 Thanks: 0 Thanked access 2007 runtime sp3 0 Times in 0 Posts Error 3070 I have an unbound search field on my form that I am using to search for
Access 2007 Runtime Windows 7
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 http://stackoverflow.com/questions/19778583/vba-with-access-runtime-error-3070 All I am trying to do is search for a company name and if found go to that 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: http://www.access-programmers.co.uk/forums/showthread.php?t=202250 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 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,302 Thanks: 4 Thanked 918 Times in 879 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: Erro
Join INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified http://www.tek-tips.com/viewthread.cfm?qid=907774 Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs access 2007 by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. Microsoft: Access Modules (VBA Coding) Forum at Tek-Tips HomeForumsProgrammersDBMS PackagesMicrosoft: Access Modules (VBA Coding) Forum Run-time error '3070': Does not recognize... as valid field name or... access 2007 runtime thread705-907774 Forum Search FAQs Links MVPs Run-time error '3070': Does not recognize... as valid field name or... Run-time error '3070': Does not recognize... as valid field name or... kjv1611 (TechnicalUser) (OP) 27 Aug 04 12:51 I am getting this error:Run-time error '3070':The Microsoft Jet database engine does not recognize 'tblAgencypmts1.*' as a valid field name or expression.At the highlighted code in the following code snippet:CODEDoCmd.SetWarnings FalsestrSqlOrig = "SELECT " & strOriginalTable & ".* INTO tblTestNew " & _"FROM tblTest WHERE (((tblTest.TransDate)<(Date()+1)));"DoCmd.RunSQL (strSqlOrig)DoCmd.DeleteObject acTable, strOriginalTableDoCmd.Rename strOriginalTable, acTable, "tblTestNew"DoCmd.SetWarnings TrueIs there something I am not doing correctly?tblAgencypmts1 is the name of the table which is being referenced in the code through a variable of a combo box.Is there some other format to use here? Stephen"Jesus saith unto him, I am the way, the truth, and the life:no man cometh unto the Father, but by me." John 14:6 KJV RE: Run-time error '3070': Does not recognize... as valid field name or... cLFlaVA (Programmer) 27 Aug 04 13:21 While this may not be the reason, you may