Ms Access Vba Run Time Error 2465
Contents |
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office runtime error 2465 can't find the field 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All
Run-time Error '2465' Application-defined
Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered
Access Error 2465 Can't Find The Field
by: Run-time error '2465' Microsoft Office for Developers > Access for Developers Question 0 Sign in to vote I have a form that is bound to two tables (Students and ServicePlans). There is a command
Microsoft Access Can't Find The Field Referred To In Your Expression
button on the form to create a report showing data from the current records (i.e., the current service plan for the current student). I had to make some structural changes in the tables. Prior to those changes, everything worked perfectly. However, the report does not gets its data directly from the tables but from a query that assembles the neccesary data in one place— and that query is still working properly. The access runtime error 2465 application defined or object defined error report also still works when opened directly (except of course it shows all records, which defeats its purpose) When I press the command button I get the error "Run-time error '2465' ...can't find the field '|1' referred to in your expression" the code behind the button is: Private Sub CmdPrint_Click() Dim strWhere As String If Me.Dirty Then 'Save any edits. Me.Dirty = False End If If Me.NewRecord Then 'Check there is a record to print MsgBox "Select a record to print" Else strWhere = "[PlanID] = " & Me.[PlanID] DoCmd.Close DoCmd.OpenReport "Contract", acViewPreview, , strWhere End If End Sub I'm guessing "field '|1' " must refer to [PlanID], since there is no other field in the code. However, the field does exist both in the form and the report (and the query). Is there some problem with the way I have referenced [PlanID]?If so, is there some obvious reason why it worked before and not now?If not, is there some other explanation for this error message? (I checked the error message in the help menu and found nothing. A google search revealed numerous threads, but all seemed to be either unresolved or not connected with this situation) Thanks!—nick Tuesday, May 01, 2012 4:36 PM Reply | Quote Answers 1 Sign in to
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 https://social.msdn.microsoft.com/Forums/office/en-US/e5c371d8-995b-4bb0-a542-7d76d3037d92/runtime-error-2465?forum=accessdev minute: Sign up Run-time error '2465' can't find the field '|1' referred to in your expression up vote 0 down vote favorite I keep getting the message Run-time error '2465' ...can't find the field '|1' referred to in your expression, please help! Option Compare Database Dim conDatabase As New ADODB.Connection Dim strConnection As String Dim strStatement As String Dim rstSL As http://stackoverflow.com/questions/25258707/run-time-error-2465-cant-find-the-field-1-referred-to-in-your-expression ADODB.Recordset Dim SLVers As String Dim strSL_ID(1 To 4) As String Dim sl(1 To 4, 0 To 3) As Variant Private Sub Load_Spec() Dim x, y As Integer SLVers = [txtVer] <---Error conDatabase.ConnectionString = "Provider=SHLKCLI10;" _ & "Server=10.210.130.90;" _ & "Database=MACHINE;" _ conDatabase.Open Set rstSL = New ADODB.Recordset strSL_ID(1) = "SL_BLT_SPD_" & SLVers strSL_ID(2) = "SL_ETC_LOS_" & SLVers strSL_ID(3) = "SL_MOD_1_HF_" & SLVers strSL_ID(4) = "SL_MOD_1_HNO3_" & SLVers For x = 1 To 4 strStatement = "SELECT dbo.SPEC_LIMIT.SL_USL,dbo.SPEC_LIMIT.SL_LSL,dbo.SPEC_LIMIT.SL_UCL,dbo.SPEC_LIMIT.SL_LCL FROM dbo.SPEC_LIMIT WHERE (((dbo.SPEC_LIMIT.SL_ID) Like '" + strSL_ID(x) + "'))" Set rstSL = conDatabase.Execute(strStatement) sl(x, 0) = rstSL(0).Value sl(x, 1) = rstSL(1).Value sl(x, 2) = rstSL(2).Value sl(x, 3) = rstSL(3).Value Next x Set conDatabase = Nothing End Sub I use this code for other forms without an error. sql vba access-vba ms-access-2010 share|improve this question edited Aug 12 '14 at 8:57 BFWebAdmin 2,12763167 asked Aug 12 '14 at 7:39 NoOB14 414 1 Have you tried debugging by adding message box of what is returned in txtVer? Make sure the table has the field names you are trying to refer to. The error normally associates
help? Post your question and get tips & solutions from a community of 418,595 IT Pros & Developers. It's quick & easy. Run-time error 2465 when opening subform P: n/a https://bytes.com/topic/access/answers/201451-run-time-error-2465-when-opening-subform Lyn Hi, this has been driving me nuts. I'm on Office 2003 SP1, Win XP SP1. I am opening a form with a number of subforms based on various tables. The subforms are populated via http://p2p.wrox.com/access/72065-run-time-error-2465-controls-syntax.html the main form's Current event. I am using similar code to open each of the subforms successfully -- except for this one case which gives the above error. I have simplified the SQL to its time error most basic level. It runs just fine as a query. I just can't make it work in VBA. Here is the code snippet: mySQL = "SELECT * FROM MiscRecs" 'simplified Me.[sfmEducation].Form.RecordSource = mySQL Me.[sfmEducation].LinkMasterFields = "" Me.[sfmEducation].LinkChildFields = "" The subform is sfmEducation. It contains several fields bound to table MiscRecs in tabular format. When the error occurs (opening the main form), the second line of the above code is highlighted time error 2465 in debug mode. The full error meesage is: Run-time error '2465': Microsoft Office Access can't find the field '|' referred to in your expression. I had the '|' occur once before and I posted a query on it. Someone answered but I have lost the reply. I think it meant that Office could not identify the field (ie, '|' is a placeholder for the unidentified field). I am sure that I am missing something very basic, but I'm hanged if I can see it! All help greatly appreciated. -- Cheers, Lyn. Nov 13 '05 #1 Post Reply Share this Question 5 Replies P: n/a Salad Lyn wrote: Hi, this has been driving me nuts. I'm on Office 2003 SP1, Win XP SP1. I am opening a form with a number of subforms based on various tables. The subforms are populated via the main form's Current event. I am using similar code to open each of the subforms successfully -- except for this one case which gives the above error. I have simplified the SQL to its most basic level. It runs just fine as a query. I just can't make it work in VBA. Here is the code snippet: mySQL = "SELECT * FROM MiscRecs" 'simplified Me.[sfmEducation].Form.RecordSource = mySQL Me.[sfmEducation].Lin
Unanswered Topics Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access Run-Time Error 2465 in Controls syntax User Name Remember Me? Password Reminder Password Register Register | FAQ | Members List | Calendar | Today's Posts | Search Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. Search Forums Show Threads Show Posts Advanced Search Find All Thanked Posts Go to Page... Welcome to the p2p.wrox.com Forums. You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free . Thread Tools Display Modes #1 (permalink) January 3rd, 2009, 03:49 PM ybg1 Authorized User Points: 110, Level: 2 Activity: 0% Join Date: Jul 2007 Location: , , . Posts: 22 Thanks: 0 Thanked 0 Times in 0 Posts Run-Time Error 2465 in Controls syntax The following routine resets 36 Text Boxes in array: For i = 1 to 36 Controls("ID" & i).Value = "" Next i It works fine. -------------------- With the following code I get a Run-Time Error 2465 that it can't find the Field ID1 For i = 1 to 36 Controls("Forms!frmBookList!fsubSubjectsBook.Form! ID" & i).Value = "" Next i --------------------- I've tried to reset this value without using Controls and it does work ok. Forms!frmBookList!fsubSubjectsBook.Form!ID1 = "" It seems to be as with the Controls syntax it dosn't work. ------------------------------------------------------- Later in the program I fill up the boxes with values from the database so I cannot do it one by one 36 times. Any Idea how to get over this problem ? Thanks #2 (permalink) January 18th, 2009, 04:45 PM RuralGuy Authorized User Join Date: Jan 2006 Location: , , . Posts: 35 Thanks: 0 Thanked 0 Times in 0 Pos