Prevent user to close tabbed form

rI use the tabbed form layout in access 2007, i.e. I went to Access options 
->current database and chose "Tabbed documents". One form is a startup fom 
and the main menu of my application. By right-clicking on the main menu tab 
the user can choose "Close" and the main menu is shut down. 

How can I prevent the user from closing down the main menu form of my 
application?

Regards
0
Utf
3/25/2010 9:56:07 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
687 Views

Similar Articles

[PageSpeed] 30

On Thu, 25 Mar 2010 14:56:07 -0700, Tore <tore@nospam.nospam> wrote:

I would argue that if they close it, you should close the whole
application. If we prevent the user from closing it, how can she close
the application?
Anyway, that aside, try this in the Form_Unload event of that form:
if msgbox("Are you sure you want to close the application?",
vbQuestion or vbYesNo) = vbYes then
  DoCmd.Quit
else
  Cancel = True
end if

-Tom.
Microsoft Access MVP




>rI use the tabbed form layout in access 2007, i.e. I went to Access options 
>->current database and chose "Tabbed documents". One form is a startup fom 
>and the main menu of my application. By right-clicking on the main menu tab 
>the user can choose "Close" and the main menu is shut down. 
>
>How can I prevent the user from closing down the main menu form of my 
>application?
>
>Regards
0
Tom
3/26/2010 1:44:34 PM
I tried your code and it works for me, thanks.

Regards from Tore
0
Utf
3/27/2010 10:33:01 AM
Reply:

Similar Artilces:

Response Time When retrieving data into an ACCESS form from SQL se
It seems like the slow response time (about 700 records) from SQL Server database, is related to retrieving one record at a time instead of retrieving all records at the same time into recordset for the ACCESS form. This retrieval generates considerably network traffic. What I would like to know is how response time can be improved. Is there a setting in ACCESS to improve the retrieval process or is this something that is related to programming such as an event?? In this case of 700 records the response time is about 4 to 5 minutes. The response time is instantanous for just a few ...

Print Selected Items in Excel Order Form
Hi, I’m new to the site and also to Visual Basic. I have found the following code from Dave Peterson on http://www.contextures.com/xlForm03.html, which does more or less what I want apart from one thing, which I can’t figure out how to change. Values from the worksheet list, starting in Column B and moving right, are copied to the order form, into the addresses specified. Instead of copying values from Column B and moving right (as in B1, C1, D1...), I would like to copy to the form only selected cells like B1, D1, H1... Print Marked Items Code Option Base 0 Sub Print...

Prevent the sales from Tendering when another Item is Scan at POS
Hello, We have serveral items that our Retail does have price assign to them. The cashier will scan the next item. They will not notice the last item they did not enter a price. Now the 2nd item is the price for the 1st item. Then the cashier will tender out the sales without noticing they have an incorrect total for this transaction. Then the store manager have to performed a post void for this transaction, which hold up the customer awaiting to check out. Have anyone else encounter this and know a way to limited sale from being total out of an acceptable sales amount...

same user@ 2 domains
Hi, I have read and tried the article "Hosting Multiple SMTP Domains on Exchange" from http://www.msexchange.org/tutorials/MF010.html. When I sent an email to 2nd domain, the exchange server response with an error message saying no such user. Detail info: I installed the active directory's domain 12345.com and email for everyone@12345.com works fine. However, my boss bought a domain name 123.com. I am asked to make both everyone@123.com and everyone@12345.com work. It means everyone has two email address pointing to the same mail box. Please help. Thanks Sincere...

preventing date from changing
I have an If condition that sets the date to "today()" true or "today() + 1" if false. My question is how do I prevent the date from changing? If the date is set for today, then tomorrow I don't want to "update". How can this be done? thanks You could copy the cell, and paste as values, before you close the file. (Edit>Paste Special, Values) Or, you could enter today's date in a cell in the row (Ctrl+; ), then refer to that cell in the formula. For example, instead of: =IF(A2="Local",TODAY(),TODAY()+1) enter: =IF(A2="Local...

If this newsgroup closes June 1, which forum covers .NET Framework
If this newsgroup closes June 1, which forum covers .NET Framework? b11_ wrote: > If this newsgroup closes June 1, which forum covers .NET Framework? You can just switch to a real NNTP server, other than Microsoft's. Microsoft has no way to actually "close" a newsgroup. All they can do is stop hosting it on their own servers. Pete I can hear the folow-on questions already - what is an NNTP server and how do I find one that also has these newsgroups? "Peter Duniho" <no.peted.spam@no.nwlink.spam.com> wrote in message news:OfYnyi3$KHA.4308@T...

outlook feature to prevent forgetting attachments
Often people forget to send attachments with emails. Very often they will write something along the lines of "I have attached the minutes from our meeting" and then forget to atcually attach a file. Is there a way therefore that outlook can check the text of an email for words like attach, attached, attachment and query the user before sending if there does not appear to be an attachment? ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree"...

time stamp upon closed
Hi Everyone, I am trying to have a time stamp mark my date_completed field when an operator changes the status field to closed. Closed is in my tblstatus table along with submitted, pending, postponed, ect. I am guessing that the code would be in the afterupdate event of the status field on my form but not sure? Iwould rather the system date the field rather than an operator. Any suggestions? I would suggest that you use a combo box for the status field. That way, the correct codes will always be entered. Then to update the date_completed field in your table, put a text box on y...

How to restrict emailing to internal users only for certain mailbox in Exchange 2003?
How to restrict emailing to internal users only for certain mailbox in Exchange 2003? -- Danny From ADUC you can go to the Exchange tabs and control who is allowed to send to a mailbox. Setting it to "authenticated users" should accomplish what you want. There are probably other ways as well. -GT "Danny Hoon" <danny.hoon@phoonhuat.com> wrote in message news:eE8aMDKIFHA.2784@TK2MSFTNGP09.phx.gbl... > How to restrict emailing to internal users only for certain mailbox in > Exchange 2003? > > > -- > Danny > Thanks but doesn't ...

SMTP Error On Exchange 2003 with One Users
Hi, Our Clients have SBS2003, and from one client when externel emails are sent this error message is displayed : There was a SMTP communication problem with the > recipient's email server. Please contact your system administrator. > <xxxxx.com #5.5.0 smtp;550 <pshah@xxxx.com>... Not > permitted> I have checked all the permissions, and he has them, even gave him Administrator Rights, still no joy, internal emails are ok. Can anyone point me in the righr direction Pls Jay ...

prevent user from deleting a tab prevent running macro from menu
how can one prevent a user from 1. deleting a specific tab in a workbook? 2. prevent a user from running a macro from the tools menu (where user can only run a macro from a command button)? thanks! #1. Protect the workbook's structure. In xl2003 menus: tools|protection|protect workbook|check structure #2. Make the sub private: Sub Testme() becomes Private Sub testme() This will stop the user from seeing that subroutine--but if they know the name, they can still type it and run it. joemeshuggah wrote: > > how can one prevent a user from...

Re: preventing distribution lists from printing
I work for a large corporation and I often get outlook mail with ver long distribution lists. Is there any way to prohibit these lenght list from printing so that I only get the message? Thank - buddy ----------------------------------------------------------------------- Posted via http://www.mcse.m ----------------------------------------------------------------------- View this thread: http://www.mcse.ms/message548641.htm ...

Prevent calculation of fields in split view
Hi all! I have following problem: Most of my forms are displayed in split view, within some of them i am doing different calculations, displaying the calculated values in text boxes. Since some of those calculations are quite time-consuming, i dont want Access to calc. the values for _each_ record in the split-view (which it is doing right now). I want it to just calc the values for the record currently viewed, is there any way to do this? best regards, --Michael ...

Macro needed to Paste Values and prevent Macro operation #2
Sub Macro1() ' ' Dim myBk As Workbook Set myBk = Workbooks.Open(Application.GetOpenFilename(, , "Select the File")) Range("To_Database").Copy ThisWorkbook.Worksheets(1).Range("A65536").End(xlUp)(1).Offset(2, 1) myBk.Close False End Sub In the above macro I need to prevent macros operating in the External File when it opens. I also need the Named Range ("To_Database") from the External File to be copied into the file from which this macro operates as PasteValues. At the moment the Formula in the Named Range is coming across, so that I'm ...

How to change user name and password in ODBC connection
My data is in sql2k server and my users access information or running report thru Microsoft Access 2003. Whenever they run the report, it gives them error. So they have to uncheck the trusted connection and enter sql username and password to get to the data. I do I configure and where should I change so user dont have you do this. It is irritation. I have one user name and password which is set for readonly in sql. I dont see any place that I can save this username and password. I would really appreciate if you kindly help me. Thanks ...

User Name Change
Thanks in Advance, I have a user who has changed her last name. I have changed all references to her last name except one email proxy which is not primary. She can log on as her new name, but all emails still reference her old last name that she send. This is even with replies to emails sent to her using her new name. I noticed that the mailbox name in Exchange System Manager still shows the old name, as well as her log ons. I went into ldp and did not find anything helpful. Can someone please point me in the right direction? Mark Simmerman Napa, CA So the non-primary e-mail address...

Prevent Forwarding #2
Hi. I need to know how to make an email message unable to be forwarded to a third party. For example if I sent an email to John, John couldn't then forward that message to someone else. Thanks!! Shannon <anonymous@discussions.microsoft.com> wrote: > Hi. I need to know how to make an email message unable to > be forwarded to a third party. For example if I sent an > email to John, John couldn't then forward that message to > someone else. Can't be done, in general. -- Brian Tillman You'd need to use a service such as those listed at http://www.slipst...

VBA Code Written Once For All My Forms
I have a couple procedures that I use for dozens of forms in teh same database. The code for this prodecure is identical. It's not in every form, but many. Can I reference such a procedure from any form I want, but write the procedure once? On Sat, 6 Mar 2010 17:21:01 -0800, VWP1 wrote: > I have a couple procedures that I use for dozens of forms in teh same > database. The code for this prodecure is identical. It's not in every form, > but many. Can I reference such a procedure from any form I want, but write > the procedure once? The usual way...

blog for Visio users
I've created a blog that has information for Visio users, if you wanted to check it out. I post fairly regularly on a range of topics. Visio Blog: http://blogs.msdn.com/mailant -- Mai-lan Visio, Microsoft Corp This posting is provided "AS IS" with no warranties, and confers no rights. Hi, Glad the Blog is here. I must be doing something wrong. When I click on the new button the pop down gives me choices. If I hit Comments, I can comment. If I hit question i get re-prompted. I am a new user and I am having a terrible time. I can drag a shape from the stencil to my drawing. ...

Prevent users from sending email?
Hi all - Objective: I would like to limit users from being able to send email to everyone in our organization. Problem: We do have an Everyone distribution list that I have configured to only accept messages from certain users. This is ok, but once the user is presented with the access denied message they just select all the users in their contact list or they select enough of the groups to have the entire organization covered and send the email that way. Putting company policies aside, is there a technology solution for this? Any ideas?? -Donnie Set the maximum number of reci...

Loading lookup field text into another form field
I am using an 'onchange' event against a lookup field to populate another form field using crmForm.all.nswit_schoolname.DataValue = crmForm.all.nswit_schoolsemployedid.SelectedText but cannot seem to make it work. Tried it on a form save event as well. Simple but ??? The reason for this is that I am attempting to update an attribute in a parent entity with the latest value in a linked entity using workflow. Hi, Try this: crmForm.all.nswit_schoolname.value=crmForm.all.nswit_schoolsemployedid.nextSibling.InnerText; HTH, Niths "Steve" wrote: > I am using an '...

Making forms work
Someone please help me make a form!!! Hi you may provide some more details what your exact problem is :-) -- Regards Frank Kabel Frankfurt, Germany RED wrote: > Someone please help me make a form!!! hi, to make a form. go to the vb editor alt+F11 on the tool bar- insert>userform ok we have a form. now what? Regards Frank >-----Original Message----- >Someone please help me make a form!!! >. > OK this sparked my interest. I am willing to read. Anyone have a link to a good site to learn about forms? Steve "Frank Stone" <anonymous@discussions.microsoft.com...

New user mailboxes not being created #2
Hi All, I am having difficulty getting newly created users to show up in the GAL. The email addresses for any new user are not being created. I can add new users successfully, either by copying from another user or by creating the user from scratch. I can log in as the new user. When I try to create the user in Outlook using Check Names, I get the following message "The name could not be resolved. The name could not be matched to a name in the address list." Any new user that I create does not get any email addresses created nor is it added to the GAL. If I go into System ...

Form Copy
When working in -> Associate Money categories with tax form lines -> Form Copy -> field get and error insert a number between 1 and 255 What does this mean and and how do I know what nuber to input ? In microsoft.public.money, Thearn wrote: >When working in -> Associate Money categories with tax form lines -> Form >Copy -> field get and error insert a number between 1 and 255 What does this >mean and and how do I know what nuber to input ? What program are you using? In later versions of Money, you select the TaxForm and then you use a drop-down list for Form...

Preventing user name from appearing in new cell Comments.
I use the comment feature in Excel 2000 regularly. Every time a new comment is started, my user name in bold appears. I always have to overwrite it an turn off bold text before I create the comment. As I am the only user on this computer, and I do not share the information on-line with any other users, can some Excel expert please tell me how can I turn off the automatic insertion of my user name? Thank you. Hi Robert, ] XL2000: Sample Macro to Remove User Name from Comment http://support.microsoft.com/?kbid=213766 -- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov...