Ms Access 2007 Runtime Error 2110
Custom Search UtterAccess Forums>Microsoft® Access>Access Forms Error 2110 while trying to set focus to subform 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 lkellyView Member Profile Oct 10 2005, 11:32 AM Post#1Posts: 10Joined: 15-September 05I have code which checks to see if a calculated value on the main form is NULL.
Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked Posts Go to Page... Thread Tools Rating: Display Modes 02-12-2008, 10:31 AM #1 TheFerrisFile Newly Registered User Join Date: Jul 2006 Posts: 16 Thanks: 2 Thanked 0 Times in 0 Posts Run-time error 2110 I am trying to set up my form so that when a button is pressed it changes the value of a hidden combo box to another value. Here is my code so far: On the http://www.utteraccess.com/forum/error-2110-set-focus-t1019207.html button Click event procedure: Private Sub bttn_date_Click() Me![ONCLog_DateOut] = Date Me![Status_ID].SetFocus End Sub On the GotFocus event procedure: Private Sub Status_ID_GotFocus() Me![Status_ID] = "2" End Sub When I press the button it returns a Run-time error 2110 "Can't move the focus to Status_ID" I have tried rewriting the code several different ways as I am working in Access 2007 and have found that some of http://www.access-programmers.co.uk/forums/showthread.php?t=143534 my old tricks don't work in '07. Thanks in advance. TheFerrisFile View Public Profile Find More Posts by TheFerrisFile 02-12-2008, 10:55 AM #2 pbaldy Wino Moderator Join Date: Aug 2003 Location: Nevada, USA Posts: 28,922 Thanks: 6 Thanked 3,236 Times in 3,182 Posts What is status_ID (textbox, label, etc)? Is it visible when the code runs? __________________ 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-12-2008, 11:14 AM #3 TheFerrisFile Newly Registered User Join Date: Jul 2006 Posts: 16 Thanks: 2 Thanked 0 Times in 0 Posts Status_ID is a Combo box that is not visible on the form. I have tried writing some code that makes the combo box visible, then change the value, then back to visible = false. But it still gets caught up on the SetFocus of the button click event procedure. TheFerrisFile View Public Profile Find More Posts by TheFerrisFile 02-12-2008, 11:20 A
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/28139563/Error-2110-Access-can-t-move-the-focus-to-the-control.html Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor http://www.pcreview.co.uk/threads/setfocus-gives-run-time-error-2110.3220910/ Services Groups Website Testing Store Headlines Experts Exchange > Questions > Error 2110 - Access can’t move the focus to the control Want to Advertise Here? Solved Error 2110 - Access can’t move the focus to the control Posted on 2013-05-26 MS Access 2 Verified Solutions 10 Comments 2,760 Views Last Modified: 2013-06-05 I am working on ms access a form in Access 2010, and getting a 2110 error. I’ve looked at some of the posts from the past dealing with this error, but still can’t seem to make sense of why this is happening. This is not a subform/form issues. All controls are unlocked and enabled. The odd thing is that the ‘set focus’ appears to work most of the time. I have attached a small accdb which replicates the ms access 2007 error. Basically, the form has a combo box and a list box. Both controls have the same row source, which is a table. The combo box is set to auto-expand, so as characters are keyed in, the next valid value in the list is filled in. For each combo box KeyUp event, a sub is called that sets the list box to the same value as the text box. (I don’t know if this arrangement has any real practical value, but that’s a different topic for discussion). Anyway, all seems to work fine so long as I key in valid values in the combo box. But if I key in a backspace, I get the 2110 error. Within the sub that is getting the error, the actual key code value shouldn’t be relevant (at least I don’t think it should). Hopefully these screen shots will give you a better idea of what is happening. This 1st picture is how things look when the form first opens.In the 2nd picture, I have keyed an ‘f’ into the combo box. Note how the list box has ‘synced’ up to the combo box value.Keyed in an ‘r’.Keyed in an ‘e’Keyed in a backspace, got the error. What should be happening here is that there is now t
code when a calendar is selected and visible to allow one to choose a date in the ctlChooseFromDate unbound control. Private Sub calChooseFromDate_Click() dteFromDate = Me.calChooseFromDate Me.ctlChooseFromDate = dteFromDate Me.ctlChooseFromDate.SetFocus Me.calChooseFromDate.Visible = False Call Refresh Exit Sub End Sub When the command "Me.ctlChooseFromDate" is executed one gets the run-time error 2110, "DLB Trucking, Inc. can't move to the control ctlChooseFromDate." This same code with a different field reference in the setFocus statement runs correctly in other forms. I have turned off the autocorrect for the ctlChooseFromDate control on the form. I have tried setting the focus to other controls on the form, all with the same resulting error message. Why can't I set the focus to this or some control on the Form? -- Cuyler Smith Guest, Aug 25, 2007 #1 Advertisements Guest Guest I've ran into the same problem before, and for reasons I don't know, in some cases the following bit of code seems to work where setfocus doesnt: DoCmd.GoToControl ("ctlChooseFromDate") -Jack "Cuyler" wrote: > I have the following code when a calendar is selected and visible to allow > one to choose a date in the ctlChooseFromDate unbound control. > > Private Sub calChooseFromDate_Click() > dteFromDate = Me.calChooseFromDate > Me.ctlChooseFromDate = dteFromDate > Me.ctlChooseFromDate.SetFocus > Me.calChooseFromDate.Visible = False > Call Refresh > Exit Sub > > End Sub > > When the command "Me.ctlChooseFromDate" is executed one gets the run-time > error 2110, "DLB Trucking, Inc. can't move to the control ctlChooseFromDate." > This same code with a different field reference in the setFocus statement > runs correctly in other forms. I have turned off the autocorrect for the > ctlChooseFromDate control on the form. > > I have tried setting the focus to other controls on the form, all with the > same resulting error message. > > Why can't I set the focus to this or some control on the Form? > > > > > -- > Cuyler Smith Guest, Aug 25, 2007 #2 Advertisements Guest Guest -- Cuyler Smith "Dymondjack" wrote: > I've ran into the same problem before, and for reasons I don't know, in some > cases the following bit of code seems to work where setfocus doesnt: > > DoCmd.GoToControl ("ctlChooseFromDate") > > -Jack > > "Cuyler" wrote: > > > I have the following code when a calendar is selected and visible to allow > > one to choose a date in the ctlChooseFromDate unbound control. > > > > Private Sub calChooseFromDate_Click() > > dteFromDate = Me.calChooseFro