Access Vba Runtime 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
Ms Access Runtime Error 2465
Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office 365 access vba runtime error 2498 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Ask a
Access Vba Runtime Error 91
question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Run-time error '2465' Microsoft Office for Developers > Access for Developers access vba runtime error 3075 Question 0 Sign in to vote I have a form that is bound to two tables (Students and ServicePlans). There is a command 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, access vba runtime error 3141 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 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
Groups Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked Posts
Access Vba Runtime Error 6 Overflow
Go to Page... Thread Tools Rating: Display Modes 02-16-2009, 08:48 runtime error 2465 application-defined or object-defined error AM #1 Will123 Registered User Join Date: Feb 2009 Posts: 5 Thanks: 0 Thanked 0 Times in
Access Error 2465 Can't Find The Field
0 Posts Help with Runtime Error 2465 Hi, i've been having some trouble with runtime error 2465- "Microsoft access cant find the field "I" referred to in your expression" I'm https://social.msdn.microsoft.com/Forums/office/en-US/e5c371d8-995b-4bb0-a542-7d76d3037d92/runtime-error-2465?forum=accessdev trying to select a record from a list box and then open a form with that records details filled out in the fields of the form. Both ISBN and Copy No are key fields if this makes a difference. Heres the code: Private Sub DeleteBook_Click() Dim strDocName As String, strCriteria As String Dim strCaption As String, strPupil As String strDocName http://www.access-programmers.co.uk/forums/showthread.php?t=165968 = "frmDeleteBooks" strCriteria = ("ISBN='" & Me![LstBooks] & "'") And ([Copy No] = Me![LstBooks].Column(1)) DoCmd.OpenForm strDocName, , , strCriteria End Sub I can get it to open a form with the right ISBN but i have trouble getting it to take the Copy No into account aswell. ISBN is a string, Copy No is an integer. Any help is appreciated. Will123 View Public Profile Find More Posts by Will123 02-16-2009, 08:54 AM #2 pbaldy Wino Moderator Join Date: Aug 2003 Location: Nevada, USA Posts: 28,829 Thanks: 6 Thanked 3,212 Times in 3,158 Posts Re: Help with Runtime Error 2465 You started out right and then stopped concatenating your string. Try this: strCriteria = ("ISBN='" & Me![LstBooks] & "') And ([Copy No] = " & Me![LstBooks].Column(1) & ")" __________________ Paul Microsoft Access MVP To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. pbaldy View Public Profile Find More Posts by pbaldy 02-16-2009, 09:06 AM #3 Will123 Regist
expression + Ask a Question Need help? Post your question and get tips & solutions from a community of 418,417 IT Pros & Developers. It's quick & easy. Runtime https://bytes.com/topic/access/answers/573492-runtime-error-2465-cant-find-field-refered-your-expression Error 2465: can't find the field "|" refered to in your expression P: n/a PW Hi, What the heck is that supposed to mean? I am getting this error on a "Me.Requery" line in a subroutine on a form, but only when I select something from a combo/dropdown box. The *exact* same code is run when I do other things (like press the Save button or tab through that control). runtime error I have searched every control, involved queries and tables and I can't find anything that looks fishy. Any ideas? -pw Dec 5 '06 #1 Post Reply Share this Question 2 Replies P: n/a Allen Browne Good night, Paul! This could be several things. What event are you doing this in? A requery could trigger a chain of events that actually fails somewhere. For example, if you are doing this in the access vba runtime KeyDown event of a text box, Access has to trigger the controls' Change, BeforeUpdate and AfterUpdate events, and the BeforeUpdate event of the form before it can save the record before it can perform the requery, which will trigger the form's Current event, and probably the Exit and Enter events of the controls. If anything at all fails in that chain, the message gets passed back up the chain and you often get a weirdly inappropriate message as a result. To avoid the problem, you may need to move the code into a more appropriate event. I find it also helps to pin down where the error really lies if you explicitly save the record first, e.g. If Me.Dirty Then Me.Dirty = False Another possible cause of Access's confusion about the names of things is Name AutoCorrect. Disable it, and compact the database. More info: http://allenbrowne.com/bug-03.html Another possible trigger is the kind of corruption that a decompile fixes. To decompile, make a backup of the database, and enter something like this at the command prompt while Access is not running. It is all one line, and include the quotes: "c:\Program Files\Microsoft office\office\msaccess.exe" /decompile "c:\MyPath\MyDatabase.mdb" Removing unnecessary references, and using Option Explicit can also help to track down the cause. There