Search results

  1. A

    From design Help

    Im a rookie when it comes to access! I have a UserTable, CompanyTable, UserPermissionTable. I want to create a form that has a combobox with the Companys Select a company and all the Users from the UserTable appear in a listbox? Next to the Users i want a check box with there permission...
  2. A

    Adapting my code

    Ha i meant filled in the Permission table with the company ID's and User ID's, If theirs no data, then there is nothing to find! :o completed Code bellow, Thanks for the Help have a good weekend!! Private Sub Form_Open(Cancel As Integer) If DCount("*", "tblUser", "userName = '" &...
  3. A

    Adapting my code

    It has worked now i have put all the company's in with my user permission table! Thank you! Could you summaries what rsO is doing, i understand most of it i think???? Also what would be the best way to have a form filter on companys and list all the users, with there Permission status yes/no...
  4. A

    Adapting my code

    I've tried the following changes, The code works with no errors but the Menu is returning all the buttons. But in my table i should on have access to one. Do While Not rsO.EOF Select Case rsO.Fields("Companyname") Case "Rothschild Waddesdon Ltd"...
  5. A

    Adapting my code

    I have modified the code slightly Set rsO = CurrentDb.OpenRecordset("SELECT tblUserPermission.UserFK, tblUserPermission.CompanyFK, tblUserPermission.Permission " & _ "FROM tblUserPermission INNER JOIN tblUser ON tblUserPermission.UserFK = tblUser.UserPK " & _...
  6. A

    Adapting my code

    Hi Paul i've got the feeling its over complicated at the moment. Ive adapted my user permission table. how can i adapt my code to still run the cases to hide the buttons if they havnt got permission? thanks Aron:banghead:
  7. A

    Adapting my code

    i have the following code that compares the environ username with the username. I need to adapt it so it looks at and compares the Username Sting and finds the ID for that field? thanks Private Sub Form_Open(Cancel As Integer) If DCount("*", "tblUser", "userName = '" & Environ("username")...
  8. A

    Select Table lookup and Auto fill in another field

    Hi Paul thank you for your reply. currently i only have the username in the userpermission table, so have no fk to link? I can put in the userfk into the user permission table but every time you make an entry you are doubling your data input e.g(select username, select userfk) Is there a way...
  9. A

    Select Table lookup and Auto fill in another field

    Hi There, not sure if this is possible or not but i have a user permission table. that consists of PermissionPK, UserFK, CompanyFK. I also want the username to be automatically filled in? So when a user ID is filled in on the table, it also fills in what that UserID's Username should be? As i...
  10. A

    Show and Hide Command Buttons

    Scrap that, i also made the change from numeric to text on the company field, which now it works! Only issue is my User permission table has no relationships, im guessing this is probably a bad thing?
  11. A

    Show and Hide Command Buttons

    Ive changed the bound column to use the text (is this bad practice?) The code is now running without error but all the buttons are showing, even though only 3 are ticked with permission? any ideas? Dim rsO As DAO.Recordset Set rsO = CurrentDb.OpenRecordset("SELECT CompanyFK...
  12. A

    Show and Hide Command Buttons

    ah ok i understand, i have tried the bellow code but im getting a 'Data Type mismatch in criteria expression'. Is this because im trying to compare the Companyfk which is numeric to a text string of the Environ? thanks Private Sub Form_Open(Cancel As Integer) If DCount("*", "tblUser"...
  13. A

    Show and Hide Command Buttons

    Thank you for the Reply i will update my code and see how it goes. Yep they are linked to the ID, its just ive hidden the 1st column to display just the description. When you say control is that when you link a form to a recordsource? thanks
  14. A

    Show and Hide Command Buttons

    Thank you the naming convention makes sense! My code is as follows i have updated with my new naming conventions. Its failing when setting the rsO? Should i be doing anything with my form recordsource? appreciate the help! Private Sub Form_Open(Cancel As Integer) If DCount("*"...
  15. A

    Show and Hide Command Buttons

    I'm trying to alter the look of my menu . Depending on the User's Permission setting from the Table . If they do not have permission for a company then, i want it to be hidden from the menu? Any tips would be appreciated thanks
  16. A

    Compare Environ Username to a Table

    that's better i can see the table design now! So if i was to have multiple companies to one user, i would have 5 user id's if they had access to the 5 companies? Can you link the permission table to show buttons for each company they have access to? thanks
  17. A

    Compare Environ Username to a Table

    I dont quite understand you comment? you need the following structure but nothing seems to follow? thanks
  18. A

    Compare Environ Username to a Table

    Thank you i will try it out, Im trying to get my head around how i should set up a table. I have a User Table and Company Table. I want to create a user permission table that lists the Users and in the columns have the 5 different companies with tick boxes so i can check or un check to...
  19. A

    Compare Environ Username to a Table

    Perfect that works a treat thank you! How should i go about filtering, the company table based on the users permissions. Will i have to create a query to do this bit? Basically we have 5 companies that have there own list of suppliers. I want to have a form that filters the suppliers based...
  20. A

    Compare Environ Username to a Table

    I will try and explain the process, I want it to run on a From open Event. When the Form opens i want to Check the Environ(Username) against a Table of listed Users (tblUser). If the environ matches a result in the table then the form opens and welcomes the user with a message. This will then...
Back
Top Bottom