Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29
  1. #16
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    here is the db.


    I want to disable three commands in right side of switchboard.
    Last edited by glen; 10-11-2012 at 01:01 AM.

  2. #17
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    June I m waiting for your reply.

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Be patient. You posted db only this morning. I can't review it until late tonight or tomorrow.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    You are using 'nisar khan' as criteria in the SWITCHBOARD open event but there is no such user in tblEmployees.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #20
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    Ohh sorry I changed now it to "abc" and it working.
    But the problem is now if I login as "abc" or "xyz" the command3 in switchboard is not visible.
    and the textbox in switchboard which I binded with "strempname" in "tblemployees" is always showing "abc".

  6. #21
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    That's because the login form is also bound to tblEmployees (unnecessary). The code to open SWITCHBOARD uses strempname field as criteria and that value is coming from the first record of the login form. Code should refer to the unbound combobox for criteria.

    DoCmd.OpenForm "SWITCHBOARD", , , "strempname='" & Me.cboemployee & "'"

    However, the combobox RowSource includes the lngEmpID field as the BoundColumn so the code should be:

    DoCmd.OpenForm "SWITCHBOARD", , , "lngEmpID=" & Me.cboemployee

    Code in the SWITCHBOARD:
    If Me!strempname = "xyz" Then Me.Command3.Visible = False

    Success is in attention to details, details, details! Learn debug techniques - refer to link at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #22
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    Thank you very much June brother.
    Now it working fine.
    But don't delete my db.
    Bcoz may be I will also ask another problems in this database.

  8. #23
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Glad it's working now.

    I keep dbs for a while but eventually discard.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #24
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    Ok no problem. If in future there was some problem I will provide it again.Thanks again

    One thing I observed now in my db.
    If I login as "xyz" then everything working fine. means command3 not visible.
    but if I go in desighn mode of switchboard and then go again in form mode.
    then it showing command3.

  10. #25
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Probably because the reopened switchboard no longer has filtered recordset and is reading strempname value of first record which is 'abc'.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #26
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    so any solution for this without disabling design mode?

  12. #27
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    As designer, you will have to deal with this if you want to edit the SWITCHBOARD then continue working in the db.

    Repeat the login so the SWITCHBOARD opens filtered.

    Don't allow users to interact with design features - disable navigation pane, ribbon, shortcut menus, F11 key. Review this thread about customization http://forums.aspfree.com/microsoft-...at-303789.html

    Disable the X close button of the SWITCHBOARD so users cannot close it.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #28
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    Ok thanks.
    I want to learn about all vb codes, access forms functions, Quarries function and macro function.
    do you know some tutorial for this or online classes?

  14. #29
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    No one-stop source. Just have to Google and see what's out there.

    Start with:
    http://office.microsoft.com/en-us/ac...010341717.aspx
    http://w3schools.com/sql/default.asp
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Enabling fields in form
    By Kivan in forum Programming
    Replies: 8
    Last Post: 08-22-2012, 03:44 AM
  2. Enabling and disabling fields
    By SgtSaunders69 in forum Programming
    Replies: 9
    Last Post: 12-27-2011, 06:11 PM
  3. Command button dis-enabling
    By Reaper in forum Forms
    Replies: 2
    Last Post: 11-23-2011, 10:51 AM
  4. Disabling and Enabling subforms
    By vt800c in forum Programming
    Replies: 3
    Last Post: 05-24-2011, 07:37 AM
  5. Enabling a control and moving to a new tab in vba
    By MuskokaMad in forum Programming
    Replies: 1
    Last Post: 03-14-2010, 05:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums