SetFocus problem- Error 2950

Hi, I'm  trying to set focus on the first control of my form and I'm
getting an error message.

The control name is "UniqueID".

I put the code "UniqueID.SetFocus" in the OnOpen event, but this did
not work, instead I am getting an error 2950 that says "Reserved
Error".

After reading the posts it seems that this might have something to do
with the fact that the UniqueID field is attached to an updating
listbox on another form?  Is there anyway around this problem?  I'd
just like to set the focus of the field to this UniqueID field when
the form opens.

Thanks!!

0
NoviceNana
2/20/2007 4:55:46 PM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
1856 Views

Similar Articles

[PageSpeed] 57

NoviceNana wrote:

>Hi, I'm  trying to set focus on the first control of my form and I'm
>getting an error message.
>
>The control name is "UniqueID".
>
>I put the code "UniqueID.SetFocus" in the OnOpen event, but this did
>not work, instead I am getting an error 2950 that says "Reserved
>Error".
>
>After reading the posts it seems that this might have something to do
>with the fact that the UniqueID field is attached to an updating
>listbox on another form?  Is there anyway around this problem?  I'd
>just like to set the focus of the field to this UniqueID field when
>the form opens.


Try using the Load event instead.

Are you sure you need to do this?  The first control in the
Tab Order list gets the focus automatically when the form
opens.

-- 
Marsh
MVP [MS Access]
0
Marshall
2/20/2007 6:26:21 PM
Thanks marshall,

that's what I thought, but for some reason it's not working on this
form.

I guess they'll just have to use the mouse to manually do it.. I doubt
anyone will die. :-p

Thanks!
Nana



On Feb 20, 1:26 pm, Marshall Barton <marshbar...@wowway.com> wrote:
> NoviceNana wrote:
> >Hi, I'm  trying to set focus on the first control of my form and I'm
> >getting an error message.
>
> >The control name is "UniqueID".
>
> >I put the code "UniqueID.SetFocus" in the OnOpen event, but this did
> >not work, instead I am getting an error 2950 that says "Reserved
> >Error".
>
> >After reading the posts it seems that this might have something to do
> >with the fact that the UniqueID field is attached to an updating
> >listbox on another form?  Is there anyway around this problem?  I'd
> >just like to set the focus of the field to this UniqueID field when
> >the form opens.
>
> Try using the Load event instead.
>
> Are you sure you need to do this?  The first control in the
> Tab Order list gets the focus automatically when the form
> opens.
>
> --
> Marsh
> MVP [MS Access]


0
NoviceNana
2/20/2007 7:10:25 PM
Reply:

Similar Artilces:

Problem Using Sort in macros
I'm new to working with Excel macros, so if this is a dumb question, I apologize. I was asked to automate view changes for a spreadsheet ( by name, by date, by birthday, etc.) Using sort to accomplish the changes worked quite well manually. The problem is that when sort is used in macro (to make the procedure easier), it selects only what it selected at the time the macro was written. If more lines have been added, it ignores them when the macro is run. Is there a solution to this? Thanks Hi Jacob, Instead of sorting a static range, say, A1:A10 try something like: Dim RngToSort a...

Another Problem
All Pub versions Does not print what you see on screen. I have a picture I placed to the edge of the page ..... the made a rectangle and faded the inside from white to clear and placed it over the picture which results in a nice fade of the picture to the edge of the paper ... well at least it sure does on screen. Problem is it just doesn't print whats on screen, instead it cuts off the picture where the rectangle was placed over the picture. Wayne wrote: > All Pub versions > > Does not print what you see on screen. > > I have a picture I placed to the edge of the...

Defrag Problem
I am not able to improve defrag of my laptop hard drive with 27% defragmentation per analysis using Windows or Norton 360 software. Do I need to reformat the hard drive and perform reinstallation? Any suggestions? either use a smarter program like SmartDefrag or find the settings in the program that you use to achieve better positioning. -- The Top Inno Setup Script Generator - http://www.randem.com/innoscript.html Roy S wrote: > I am not able to improve defrag of my laptop hard drive with 27% > defragmentation per analysis using Windows or Norton 360 software. Do...

Formating problem...
I have a chart in Excel. On this chart I placed a combobox which I added using the <Forms> toolbar. My combobox displays a drop down list which I typed into an excel spreadsheet i.e. the items wanted the combobox to show. How can I format the items displayed in the combobox? If I change the original entries on the spreadsheet there is no effect. Presently all the items displayed are in black. How can I get the combobox list to show items in a bold red format for example? Ideas welcome... Alex Hi AFAIK this is not possible for this combo box -- Regards Frank Kabel Frankfurt,...

Problem installing Outlook 2003 on Vista Ultimate SP1 64-bit
Hi guys, I just had a 32-bit Windows XP/Office 2003 machine die on me (fried motherboard), so I bought a new box, but this time 64-bit onto which I installed Vista Ultimate SP1 (but kept Office 2003). I wanted to transfer over all my Outlook 2003 stuff from the old hard disk, to the new one, including my former inbox directory structure, all my old emails and other stuff. Following Judy Gleeson's advice, I copied over the files, and Outlook seems to have recognised them as expected. I can now see all my old inbox folders and all the old emails. The problem is that I'm unable t...

SetFocus() ?.....
Hi there. I have a simple dialog-based application. In one dialog's OnInitDialog function, I try to set the focus on a particular Edit box using: CEdit *pEdit = (CEdit*)GetDlgItem (IDC_MY_EDIT); pEdit->SetFocus() however, this seems to have no efect - focus goes instead to another edit (the first in my tab order) Any ideas what I'm missing? Any help would be appreciated!.... "len" <len@discussions.microsoft.com> wrote in message news:3112BEC2-1F8B-4BCD-A056-0A54B05F167C@microsoft.com... > Hi there. > > I have a simple dialog-based application....

Messaging subsystem error???
On my pc (XP with SP2) I'm running Outlook '97 on one account and Outlook Express on another. Both have functioned just fine for almost 2 years. Several weeks ago, my wife opened Outlook '97 for her mail and got the following error: "Microsoft Windows(TM) Messaging Subsystem Spooler has encountered a problem and needs to close. We are sorry for the inconvenience." She has been unable to get or send mail since. My Outlook Express has worked just fine throughout. Any thoughts on how can I get her back in business? I tried going back with XP's system restore, bu...

Setfocus question
Hi, I have 5 textboxes on a multipage control. In 4 of the textboxes, the user should enter his details only once, while in the fifth textbox the user should reply a question and click the OK button. No matter what was his answer, he gets new question and the focus shouls be back to the fifth textbox in order to reply the next question. My problem is that I want that the user will be able to send his answers not only by clicking the OK button but also by clicking 'Enter' after typing the answer to the textbox, and I can't get the focus in the fifth textbox after ...

Problems with Google
I have created my site in Publisher. Google, and MSN Search as well, refuses to find my site although I have tried to submit the site/URL to Google. I have started to wonder if the code generated by Publisher create problems for search engines. Any one else that have experienced the same problem? Unfortunately it seems to be impossible to export a site created in Publisher to Frontpage or any other program, so I don't know how to solve the problem. Or am I wrong? Peter, Stockholm, Sweden I can't answer the part about Google but I can tell you that many others have uttered som...

CSpinCtrl problem
An annoying problem: What I'm trying to do is set an edit control with associated spin control. It's blank to begin with (that's set in OnInitDialog), then when the spin button is pressed the value is displayed and another edit control is set active. Here's the UDN_DELTAPOS code with some debug stuff thrown in: NM_UPDOWN* pNMUpDown = reinterpret_cast<NM_UPDOWN*>(pNMHDR); CString szData = ""; CWnd* pHeading = GetDlgItem(IDC_AC_PARAMS_EDIT_HDG); CWnd* pRofCHeading = GetDlgItem(IDC_AC_PARAMS_EDIT_ROT); CSpinButtonCtrl* pSpinHeading = static_cast<CSpinBu...

Problem with CFileDialog
CFileDialog is extremely slow on windows xp when trying to view files in a directory with as few files as a 1000 over a network. The File Dialog box opens and hangs with the hour glass icon blinking for as long as 6 mins before displaying a view of selectable files. This doesn't seem to be such a problem under Windows NT 4. Any help would be greatly appreciated thanks John. Good news : We too had the same problem (XP) - not even across a network !. Bad news : We couldn't fix it either :-( What appears to be happening is that accessing a directory, XP insists on caching t...

finding error in xls file
Excel 2002 SP3 Win XP Pro SP2 Hi, Is there a utility or a way for me to find errors in a workbook (xls file) that could cause errors such as too many resources needed, etc.? I have a file that seems to have bloated in size all of a sudden, and is giving me at times an error message as above (and then causes Excel to crash). I have used a macro to look at each link and beyond a label in a spreadsheet, it all looks fine. I am talking about a "structural" error (as opposed to a calculation error) perhaps.... "stef" <notvalid@nomail.nul> wrote in message news:...

Initiate session problem
Hello. I have a big problem. My hp server with win 2003 standard 32bits was broken (hardware problem) and now when system boots i can not start a session on console. It shows pres ctrl+alt+supr . At that moment i put my user name and password but again shows press ctrl+alt+supr. Windows was running with raid 1. Any one knows what happen and how i can solve this ? Thanks. did you try safe mode "Uyyy" <jperezme@ono.com> wrote in message news:25EEF432-0468-46C0-9321-E610C18BF511@microsoft.com... > Hello. > I have a big problem. My hp server with ...

DS_E_INSUFFICIENT_ACCESS_RIGHTS error
Hi all , I got the problem the error is DS_E_INSUFFICIENT_ACCESS_RIGHTS , due to my service admin account is unknown account now , how can i remove this account , thx Stanley I also have the same error when i try using the Exchange Administrator from a Windows XP Pro (SP2) workstation, and it seems that it happened when a domain was added that used a Windows Server 2003 DC (mixed mode), and we also have this error when modifying admin rights to the 'Adminnistrator'!!!!!!!!!! any help on this would help Jason "Stanley" wrote: > Hi all , > > I got the pr...

SetFocus problem.
My application has a hidden main display window that is never used. The application hangs out in the system tray and has a couple of configuration windows that can be opened from the system tray menu. The program has a couple of odd-ball fatal error scenarios. When these happen, the program displays a fatal error message using AfxMessageBox and it shuts down normal processing. This includes stopping the system menu so that the config windows can't be opened. Here's the problem: If the AfxMessageBox window is covered by some other program, I want the action of right clicking my...

Solving the Print Problem in Lifetime Planner
If you have problems printing the "Complete financial plan" in the Money 2004 Lifetime Planner -- such as missing graphs -- here's a solution that works: print to a PDF file using the utility 'pdfFactory' from FinePrint Software (www.pdfFactory.com). Of course, once you have the output saved in a PDF file, it's easy to produce hardcopy. Interestingly, a similar approach using the Microsoft Document Image Writer as an output device does not appear to work. ...

Outlook Toolbar Problems
I've been having problems with disappearing Outlook toolbars such as the Norton Anti-Virus and Google Outlook Search. I renamed the outcmd.dat file and that fixed everything, but the next time I started Outlook, the toolbars disappeared again. I renamed outcmd.dat again, fixed it, but the problem came up again when Outlook was next opened. I am running Business Contact Mgr and Outlook Backups. Could these be the source of the problem? Any suggested fixes? Thanks, Hayden Shumsky www.haydencoach.com Path To Purpose Program 'Clarity and Results for Young Adults' ...

SetFocus() and the cursor
Sorry for the novice question here. I have a CEditView in a MDI app. I want to do some things in OnSetFocus() for the view but when I override OnSetFocus() I lose the (carat) in the CEditView. I I suppose I am supposed to turn the carat (cursor?) back on when the focus is set to that view but I am having trouble getting that to work. I can create another carat but it doesn't seem connected to the Edit View since it does not move with keystrokes. How to I resume the default carat or setup a carat that works the same way in my OnSetFocus() routine. Thanks eng What is it that you are d...

Access 2003 error "There was an error executing the command."
Hello all, I have an issue where I had installed Office 2007 on my new Vista machine and due to the great new feature (NOT!) of Access 2007 caching linked tables when the db was opened, I had to "downgrade" to Access 2003. Every since I downgraded to Access 2003 one of my databases comes up with the "There was an error executing the command" comes up when I try to launch my report from the switchboard. This database works fine with a clean Access 2007 (even though it caches data and changes to sharpoint while the db is open are not reflected), and works just fine ...

Vista System Problem
I'm wondering if someone can help me with this problem with Windows Vista: On one of the profiles after logging on all the icons with the exception of the recycle bin disappeared. Having had previous problems with the desktop where the icons were non-responsive I logged out and back with no results. Thinking maybe someone deleted them all by accident i restored the contents of the recycle bin and that did nothing either. Multiple error messages were popping up and one said access to C://Windows/System32/config/systemprofile/desktop was denied. I opened this file and in the proce...

.SetFocus() to an IFrame
Hi everyone, I have a Tab with an IFrame to a WSS doc lib. Since the name of the Account is integrated with SharePoint, I have OnSave code that check to see if the Account Name has been changed. If it has, the user is alerted, and I want the Tab with the doc library to take focus. How can I use .SetFocus() on a tab? I've tried: crmForm.all.tab2Tab.SetFocus(); crmForm.all.iframe_name.SetFocus(); Neither work. So I added a field to the IFrame tab, tried to SetFocus() to that field, then hide it: crmForm.all.my_field.SetFocus(); crmForm.all.my_field.style.display = 'none'; ....

Exchange 2003 error MSExchangeIS Mailbox Event ID 1173
All, Any idea on how to track down this folder within the mailbox store so I can repair the view? Event Type: Warning Event Source: MSExchangeIS Mailbox Store Event Category: Views Event ID: 1173 Date: 11/30/2005 Time: 11:36:01 AM User: N/A Computer: EXCHANGE SERVER Description: Error 0x6bb deleting unused restricted view from folder 1-56A5C1A on database "First Storage Group\Mailbox Store (EXCHANGE SERVER)". Microsoft Exchange Information Store will try to delete the view again at the next maintenance interval. For more information, click http://www.microsoft.com/contentre...

Problem with Outbox
Config: Win2K and Outlook 2K with latest SPs. When sending an email, the message gets transmitted but doesn't move from the Outbox folder to the Sent Items folder. I must manually copy the messages or risk dual transmissions. Any help is appreciated. Geary Try deleting the OST file: Close Outlook Search the hard drive for *.ost (be sure to search in hidden files) Then delete it (or all that you find) Open Outlook A new OST file will be created when you open Outlook. -- Nikki Peterson [MVP - Outlook] "Geary Boulrice" <boulrice@sonalysts.com> wrote in message n...

Outlook Web Access Problem #2
When access folders in OWA we get a Loading... message and can never access items in these folders. Is this for all users, some item to check, have you a language installed in IE, go to Tools > Internet Options > Languages, is the computer time you are trying to access OWA within 5 minutes of the Exchange server, have you tried emptying Temporary Internet folders, are you using SSL (https) or plain vanilla http. What version of Exchange. Can you access it internally? "cmc" <cmc@ttslc.com> wrote in message news:04d101c3d942$f455f9d0$a301280a@phx.gbl... > When access f...

update979683 problem
I always keep my updates set to automatic, but notify me first. A few months ago I had one update that just kept showing up again and again and seemed to not be able to install. It was 975xxx something can't remember. Finally I just cancelled it since it never would hold, and then the rest of my updates kept on updating regularly since. Now today I get this #979683 update and it is doing the same thing again. It downloads, it installs and then it pops up again and says I need to download and install it. It did this over and over again just like the other one a few months ago. S...