Ms Access Vba Error 2424
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 MS Access error 2424 Cannot find object up vote 1 down vote favorite I have what looks like a very straightforward line of VBA code that is really messing with my head. id = Form_frm2013_Browser.tb_LineItem_ID.value When my code reaches this point, I get the following error: Run-time error '2424': The expression you entered has a field, control, or property name that Microsoft Access can't find I am pretty sure the problem is the lower-case "v" in value. When I use the intellisense code completion, the property "Value" comes up as upper case, but when I press enter, it goes to lower case. Of course manually attempting to change it doesn't work either--it just goes back to lower case. By the way, tb_LineItem_ID is the name of a text box control. Any idea what is going on here? vba ms-access share|improve this question asked Jul 11 '13 at 18:27 MrGibbage 97432538 Assuming frm2013_Browser is currently open in Form View, what do you get in the Immediate window with this? ... Debug.Print Forms!frm2013_Browser!tb_LineItem_ID.value –HansUp Jul 11 '13 at 18:35 sigh... that was it. I was getting some errors in there. Well, that sure a misleading error message. "Can't find" is not the same thing as "bad input". @HansUp, resubmit your comment as an answer and I will mark it as correct. –MrGibbage Jul 11 '13 at 18:38 tb_LineItem_ID was a hidden text box on my form. Most of the time it was getting filled in correctly with an integer, but under certain cases, it was getting a #Name? error. When it had that error, that line won't work. I need to fix the #Name? error. You gave me the idea to see what was in the text box. SInce it was hidden, I didn't see it until you suggested it. –MrGibbage Jul 11 '13 at 18:49 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted Access is complaining it can't find something when you ask for the value of a text box. I can't spot anything wrong in that code line, but
Social Groups 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 06-02-2003, 09:16 AM #1 Kevin_S Registered User Join Date: Apr 2002 Location: Lansing, MI Posts: 635 Thanks: 0 Thanked 2 Times in 1 Post Error 2424 Object not found... Hi Everyone, I have to post this because it is: (1) Driving me INSANE and (2) I can't for the life of me figure out what is going wrong so here http://stackoverflow.com/questions/17600735/ms-access-error-2424-cannot-find-object goes.... I have an unbound form that, at runtime, is given a recordsource of 1 of 2 queries depending on the users selection on the previous form through the double-click event of a listbox with this snippet of code: [Forms]![frmVac_Log].RecordSource = "qryVac_Log" Simple enough and everything works great. Now - what I want to do is hide or display a few controls on the form depending http://www.access-programmers.co.uk/forums/showthread.php?t=48685 on a selection in the form with a simple If-Then-Else statement like this example: If (This field) = 1 then 'Display this control else 'Display that control end if Very, very simplified HOWEVER When I put this If-Then statement in ANY Event Procedure (On Open, Current, Activate, Load,etc...) It errors and gives this message: Runtime Error '2424' The expression you entered has a field, control, or property that Microsoft Access can't find And it highlights the first line in the if-then code Everything is spelled correctly and the references are set right - no spelling errors or nothing... Anyone have any ideas why this is happening? Thanks, kev __________________ MCAD .NET MCP VB.NET MCP C#.NET Kevin_S View Public Profile Find More Posts by Kevin_S 06-02-2003, 09:20 AM #2 Pat Hartman Super Moderator Join Date: Feb 2002 Location: Stratford,Ct USA Posts: 25,623 Thanks: 12 Thanked 1,042 Times in 990 Posts Make sure that you are referencing the name of the control rather than the name of the bound field. Pat Hartman View Public Profile Find More Posts by Pat Hartman 06-02-2003, 09:26 AM #3 Kevin_S Registere
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help https://www.experts-exchange.com/questions/28921005/Run-time-error-'2424'-The-expression-you-entered-has-a-field-control-or-property-name-that-Microsoft-Access-can't-find.html Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor http://www.utteraccess.com/forum/Run-Time-Error-2424-Fi-t1603269.html Services Groups Website Testing Store Headlines Experts Exchange > Questions > Run-time error '2424': The expression you entered has a field, control, or property name that Microsoft Access can't find Want to Advertise Here? Solved Run-time error '2424': The expression you entered has a field, control, or property name that Microsoft Access can't find Posted on 2016-01-26 MS ms access Access 1 Verified Solution 5 Comments 88 Views Last Modified: 2016-01-27 Thank you for looking at my question, I have a report in Access that I would like to have different background colours for each line depending upon the value of a control on that line. I wrote this as the On Open event: Private Sub Report_Open(Cancel As Integer) If Me.txtInstrFlag.Value = "R" Then Me.Detail.BackColor = ms access vba RGB(143, 188, 139) End If' End Sub txtInstrFlag is the name of the control that holds the value InstrumentFlag and is spelt correctly. If anybody can tell me where I'm going awry I would be most grateful 0 Question by:Crxfrd Facebook Twitter LinkedIn Google LVL 47 Active today Best Solution byDale Fye (Access MVP) instead of the report open event, use the Detail sections Paint event. During the Report Open event, the data has not been loaded yet. Then you should be able to use your original code: If Go to Solution 5 Comments LVL 47 Overall: Level 47 MS Access 13 Message Active today Expert Comment by:Rgonzo19712016-01-26 Hi, pls try If Me.txtInstrFlag.Text = "R" Then Select all Open in new window Regards 0 Message Author Comment by:Crxfrd2016-01-26 RGonzo1971, Changes the error to r/t error 2185 'You can't reference a property or method for a control unless the control has the focus' 0 LVL 47 Overall: Level 47 MS Access 46 Message Active today Accepted Solution by:Dale Fye (Access MVP)2016-01-27 instead of the report open event, use the Detail sections Paint event. During the Report Open event, the data has not been loaded yet. Then you should be able to use your original code: If Me.txtInstrFlag.V
Custom Search UtterAccess Forums>Microsoft® Access>Access Forms Run Time Error 2424 - Can't Find Control Forum HomeSearchHelpUA Messages|-- UtterAccess.com NewsAccess Knowledge Center|-- Access Code Archive|-- Access Knowledgebase / FAQ|-- Access TutorialsMicrosoft® Access|-- Local Access User Groups (AUGs)|-- Interface Design|-- Access Q and A|-- Access Tables + Relationships|-- Access Queries|-- Access Forms|-- Access Reports|-- Access Macros|-- Access Modules|-- Access Date + Time|-- Access Errors + Error Handling|-- Access Built-in Functions|-- Access Searching + Data Mining|-- Access Records|-- Access Security|-- Access Automation|-- Access Database Container|-- Tool bars, Menu bars + Ribbon|-- Access Services (Web Databases)|-- Access Data Access Pages (Deprecated)|-- Access Data Projects - ADP|-- Access Runtime, Packaging & DeploymentAnd More...|-- Microsoft SQL Server|-- SQL Server Reporting Services|-- Microsoft SharePoint|-- Microsoft Internet Explorer|-- Visual Basic 6 and Earlier|-- Visual Basic 2003 and Later|-- ASP and VBScript|-- Web Development|-- PHP, Perl, MySQL and Postgres|-- Other Database Engines|-- BI Tools and Applications|-- JAVA and C#|-- GraphicsMicrosoft® Office|-- Microsoft Excel|-- Microsoft Excel FAQs|-- Microsoft Word|-- Microsoft Outlook|-- Microsoft PowerPoint|-- Microsoft FrontPage/Exp. Web|-- Other Microsoft ProductsPC|-- Network Issues|-- Q & A - Hardware|-- Q & A - Software|-- Q & A - Other PC|-- Virus + Security DiscussionUtterAccess Odds and Ends|-- General Chat|-- Q & A - UtterAccess.com Forums|-- Q & A - Access Wiki Options borissView Member Profile Mar 5 2008, 08:14 AM Post#1Posts: 211Joined: 25-September 02From: St Petersburg, FLAI am trying to utilize an Audit Trail to keep track of changes in my database. It works fine on a single form, but when I try to run it on a tab form I get Run Time Error 2424. Is this because of the Tabs? Here is the code:Private Sub Form_BeforeUpdate(Cancel As Integer)On Err GoTo TryNextC Dim MyForm As Form Dim ctl As Control Dim strUser As String Set MyForm = Screen.ActiveForm strUser = fOSUserName' Set date and current user if form has been updated. MyForm!Updates = MyForm!Updates & Chr(13) & Chr(10) & "Changes made on " & Now & " by " & strUser &