Turn off command buttons if a manager doesn't have accounts

I have a form where users first login and get a UserID.

I have a table with accounts and the accounts are assigned to the users.  I 
have a relationship between tblAccounts and tlbUser (UserID).

The next form is the main form and I would like certain controls to 
disappear if the user does NOT have any accounts assigned to him (ie. Sales 
supervisor).  

Right now I have it setup where the form checks if that specific UserID is 
logged in and turns them off accordingly.  But pretty soon others without 
accounts will be able to log in (ie. Purchasers, Customer Reps, Engineers) so 
this will become inefficient really quickly.

How would I do this?
-- 
TIA
0
Utf
1/7/2008 7:15:05 PM
access.forms 6864 articles. 2 followers. Follow

1 Replies
494 Views

Similar Articles

[PageSpeed] 10

In the form Load event, do a DLookup to see if the user has any accounts 
assigned and set the visibility property of the controls as needed.  Do the 
DLookup on the field that carries the user name.
-- 
Dave Hargis, Microsoft Access MVP


"tsison7" wrote:

> I have a form where users first login and get a UserID.
> 
> I have a table with accounts and the accounts are assigned to the users.  I 
> have a relationship between tblAccounts and tlbUser (UserID).
> 
> The next form is the main form and I would like certain controls to 
> disappear if the user does NOT have any accounts assigned to him (ie. Sales 
> supervisor).  
> 
> Right now I have it setup where the form checks if that specific UserID is 
> logged in and turns them off accordingly.  But pretty soon others without 
> accounts will be able to log in (ie. Purchasers, Customer Reps, Engineers) so 
> this will become inefficient really quickly.
> 
> How would I do this?
> -- 
> TIA
0
Utf
1/7/2008 7:40:00 PM
Reply:

Similar Artilces:

Two mailboxes for one user account after mailbox moved to a new server
After moving a user's mailbox from a Exchange 2003 to a new Exchange 2003 server, Outlook has listed two mailboxes with same name in the "All Mail Folders"area. The Outlook profile only has the user mailbox and no other mailboxes added to it. The user can send and recieve email just fine. The mailboxes seem to be clones of each other. New mail show up in the mailboxes at the sametime. How can I get Outlook to only show one mailbox? Any help would be appreciated, thanks, ...

Two profiles sharing one email account/pst?
I have a laptop, Win XP Pro & Office XP, that I use at work logging in as user/domain. At home I log in as user/laptop. The first time I used it at home & tried to check mail (mail was originally set up at work), it went through the motions to set up a new email account. Surely, I can share the same mail account or pst between profiles, but how? Thanks find the pst from work on your computer - if windows explorer, tools, options, view hidden files and folders is not set to show hidden files and folders, change it and then browse to C:\Documents and Settings\work_username\Local Setti...

Update Manager
Everytime I boot up my PC a small window pops up entitled "UPDATE MANAGER". It shows two progress bars, but nothing ever happens. Why is this window popping up every tiem I turn on the computer and how do I get it to stop? It never used to do this, it just statred lately. Thankyou. tony Because you installed something which features an update manager "Omaha Tony" <OmahaTony@discussions.microsoft.com> wrote in message news:A08659C0-1560-4E8C-8A1C-76A5B1DBB1F8@microsoft.com... > Everytime I boot up my PC a small window pops up entitled "UP...

managing two identities
need some help folks: i set up two identities with outlook express 5 and in general the download from both accounts works fine, but whenever i try to switch from the main identity to my second identity the download would not work and then, when trying to switch again back or quit, the program stops working and i get a message soundling like 'outlook express could not be started because another instance of outlook express is still running' any leads how to get two identities work smoothly? cheers and thanks "Gernot" <h9851633@wu.edu> wrote in message news:5f7001c3b34...

Collection Management email
Hi, We just add a new collection management module into GP 8.0. It works as expected, but when we are trying to send both the collection letter and the invoice, the system send 2 seperate email to the customer. 1 is the collection letter and the other one is the invoice. Is there a way to make it send only 1 email (collection letter in the body and invoice as attachment)? Since it's completely unreasonable to send 2 emails for the same purpose and I'm sure a system like GP is able to accomplish this. Thank you in advance for your help. ...

Radio Button as Filter
Outside of my form (frmComments) I have created option buttons (CommentFilter) that I would like to use as a filter within the form . . . filtering on [Finished] which is a Yes/No property at the table level (tblComments). My radio button has three choices: #1 for Finished = No #2 for Finished = Yes #3 for Finished = Both However when I click on any of the three radio buttons I do not see any filter activity in the form. Any suggestions? Private Sub CommentFilter_AfterUpdate() Select Case Me!CommentFilter Case 1 Me.Filter = frmComments![Finished] = 1 Me.FilterOn = True MsgBox "Fini...

Need a default email account for all users, need help.
I have a tablet PC running WinXP Tablet with Outlook 2003. This tablet will connect to our exchange server via VPN. How can I set it up so that everyone that logs onto their account can access one (the same) email account. The problem is that I dont know at this point all of the users however anyone using the tablet will use one generic email account. So how can I set Outlook to default to this account so that no matter who logs on they will use this account? Thanks! Shane ...

Project accounting info for vendor does not exist on version 9
We have 15 companies, of which only ONE company uses project accounting. User ID does NOT have access to the alternate POP window to show project information. Why are we receiving the error that the vendor does not have PA info setup, when we are not using PA in this company? How do we shut this off for window that is not showing PA? As well in the company that will be using PA, if the PA info does NOT show on the window, we are entering regular POs therefore we do NOT want any PA info for the vendor. ...

unable to access mail after re-enable account
Hi, After enable an disable account and change its password, it can login to its mail account. What's happening. Is it normal? Thanks a lot What is the error message when user tries to access mailbox? Does the user still show in ADUC has having Exchange attributes? Have you looked at the MB using ESM to see if it is disconnected? "Raymond" <anonymous@discussions.microsoft.com> wrote in message news:136c01c46f11$d16f8390$a301280a@phx.gbl... > Hi, > > After enable an disable account and change its password, > it can login to its mail account. What's hap...

Contracts for Account and sub-account
Hi, I don't find how to relate cases of a sub-account to active contract lines of its parent account? Development needed ? Thank you ManU ...

Business investment accounts?
Does anybody know how to add an investment account under the business catergory? Money forces you to make them personel accounts and I am becoming extremely frustrated. Doesn't anybody at Microsoft realize that companies make investments too!? I am new to this program, but I cannot find it either. My guess is that = Home and Business is designed for small home businesses that are not too = far along. If your company is far enough along to have its own = investment accounts (are you incorporated?) then you probably need to go = to something like Quickbooks and separate your business a...

how to turn off automatic format in Excel?
Hi Excel automatically change the first character in a cell to be uppercase. I just want lowercase. How can I turn off this function? Thanks Ngoc Hi Go to Tools / Autocorrect and uncheck Capitalize first letter of sentence. Andy. "ngoc" <linh@chello.no> wrote in message news:BOKNb.271$O41.819@amstwist00... > Hi > Excel automatically change the first character in a cell to be > uppercase. I just want lowercase. How can I turn off this function? > Thanks > Ngoc > ...

Where did my file and edit category button go?
Go to Tools > Customize > Commands Tab > Categories > Built-in Menus and drag the two missing commands to your toolbar. -- Brian Kvalheim Microsoft Publisher MVP http://www.publishermvps.com This posting is provided "AS IS" with no warranties, and confers no rights. "JStud" <JStud@discussions.microsoft.com> wrote in message news:9CDB953A-263A-4DC6-B95C-64B25D93176F@microsoft.com... > ...

Date Format turn to Year
Hi, I tried to convert the date to YEAR and then the year plus 25 Years later. =Year(A1) I'm getting the result 1900 instead of 1965. I tried to add 25 years later to 1990 from 1965. Your help would be much apprecated. Thanks What's in A1? Are you sure it's a real date? "learning_codes@hotmail.com" wrote: > > Hi, > > I tried to convert the date to YEAR and then the year plus 25 Years > later. > > =Year(A1) I'm getting the result 1900 instead of 1965. > > I tried to add 25 years later to 1990 from 1965. > > Your ...

Running an Excel Macro from an Access Command Button
Hi , Can anyone help me with this, I am trying to run an excel macro from an access command button. I want the macro to Bold the Headings on a excel spreadsheet. The code runs without any errors but the macro doesnt seem to work, I think I have got the line ExcelApp.ExecuteExcel4Macro "RUN(""PERSONAL.XLS!BoldHead"")" wrong The code: Private Sub cmdRunMac_Click() Dim ExcelApp As Excel.Application Dim ExcelBook As Excel.Workbook Set ExcelApp = Excel.Application ExcelApp.Visible = True Set ExcelBook = ExcelApp.Workbooks.Open("C:\Documents and Settings\...

MVP PLESE; Report Manager
I did all required in installation and when the Report Manager comes up I get no options either under "view or scenario", All I see is "none". No selection in the drop down for any of the 6 out of 20 columns I want to print. Is my Report Manager corrupted? I just d/l it today from the MS site. Running Excel 2002. It's so easy in MS Works. ...

Grant admin rights to user account
Can I create user account in GP and grant the same capabilities that sa user has to that account (e.g the new account can create another user account) ? Hi qwerty What version of GP are you runing? Fliehigh "qwerty" wrote: > Can I create user account in GP and grant the same capabilities that sa user > has to that account (e.g the new account can create another user account) ? Hi Fliehigh, I use Version 9. "Fliehigh" wrote: > Hi qwerty > > What version of GP are you runing? > > Fliehigh > > "qwerty" wrote: > > > C...

Vanishing Control Toolbox Command Buttons
I have recently had my work PC upgraded from Windows NT to XP, and am now using Excel 2003 rather than 97. A spreadsheet I use each day contains a number of command buttons (from the control toolbox menu rather than forms). When I open this spreadsheet I cannot see the buttons. If I click on where the buttons are they still work, and I can still see the code behind them, but I cannot see the buttons themselves. Similarly if I try to create a new command button - or indeed any control - from the control toolbox I get the same problem. But again I am able to create buttons from the form...

modify contact address when account address gets modified
Hi, How do I ripple my changes from company level to the related contacts ? For example the main company phone number and the main address ? Do I need a product like Scribe for this, or can this be done with the workflow ? Thanks for any advice Wim You can't do this with workflow, and I don't believe Scribe can do this (though I may be wrong - I've only used Scribe for one project). I would think that you'd need to create a post callout using the SDK. There is more info at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/CrmSdk1_2/htm/v1d2microsoftcrmversi...

BofA Account not updating
My BofA credit card account is not updating in Money 2007 Deluxe. It has not updated since 16 May. Is anyone else having this problem? A call to MS has yielded no results... ...

Module/Macro Button for Switchboard
I have a database that is in use that uses a switchboard upon opening the database. There are buttons on the switchboard that create a new record in add form and another for edit an existing record. One of the fields i have in the database is case#. Is there code i can use such that on the click of the button the prompts me for a case number to take me to only that one case number. I was thinking this is a better option than giving all records. Thanks for any thoughts or suggestions. Beetle replied You could create a separate small popup form with an unbound textbox to input a cas...

Importing Purchase orders with integration manager.
When I import a purchase order in Excel, GP creates a separate po for each line item. How do I get the line items under one PO number? I notice that the SQL option does not allow you to have a query relationship. You will need two source tables, one with PO header info and one with line information. Use two sources in Integration Manager and relate them by a common field (like PO Number) If I remember correctly, there is a sample integration provided just like this. -- Richard L. Whaley Author / Consultant / MVP Documentation for Software Users For help learning and better using Dyna...

hide/close/delete shared account
(bear with me. i'm new and although this is my second time trying to set up money, i've run into the same problem and have yet to find the answer in the forum.) i have four bank accounts and one is shared with a family member. i don't want this account to show up at all in money essentials. i tried "closing" it. i tried "hiding" it. i tried "deleting" it. but each time i go back to "categorize my transactions," transactions from that account are still there. The problem here is that Money is designed (and Money Essentials (MEss) even ...

Missing send/receive button #2
After I installed Outlook 2003 on a new computer and migrated my data file, there's no send/receive button when I click on personal folders in Mail and it doesn't appear on the tools menu. I've done reinstall/repair twice without fixing the problem. Is there some configuration procedure I need to do? Thanks for any help. Windwatcher wrote: > After I installed Outlook 2003 on a new computer and migrated my data > file, there's no send/receive button when I click on personal folders in > Mail and > it doesn't appear on the tools menu. I've done reinst...

Adding button to Form, How to get the wizard?
Hello, I am adding a button to my form and I need the button to open, save or close other forms. I want the wizard to start directly after I add the button to the form. I started first time but than I have to changed someting and it is not running anymore. Can you help me? Thanks a lot Jan, When you have the form in design view goto the Toolbox toolbar and ensure that the Control Wizard (2nd button from the left) button is selected (highlighted). This button can be enabled or disabled. when enable the wizard will startup when disabled it leaves you to do all the worksetup yourself...