Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Diary Application (A2000 SR1)

    I'm starting a diary application within my database, with more of a user specific way.

    If I design a system where the current user is selected, the user will be tied to one machine unless he or she logs off the network and re-logs on with their own id. (I don't want to go down that route)

    What would be ideal, is a table populated with passwords, enabling any user to use any machine, dependant on their personal password.

    Does anyone have any tips. idea's, demo's before I undertake this project.

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diary Application (A2000 SR1)

    Hello Dave,

    I stripped this out of my current database, it works okay for me!

    But, uses a global variable <img src=/S/sad.gif border=0 alt=sad width=15 height=15> so for goodness sake don't tell Charlotte!
    Attached Files Attached Files

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Diary Application (A2000 SR1)

    <pre>If I design a system where the current user is selected, the user will be tied to one machine unless
    he or she logs off the network and re-logs on with their own id.</pre>

    If you use the Security system built into Access the current user of a db is not the same as the current user logged on to the network.
    So it does allow users to roam around.
    If you build your own users table you are recreating the security system.
    Regards
    John



  4. #4
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diary Application (A2000 SR1)

    Thanks John.
    I've not messed with access security before, perhaps an easy talk thru would help.
    I much prefer to create my own users for more control over them.

    Thanks for demo Rupert, I'll look at it later.

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diary Application (A2000 SR1)

    <P ID="edit" class=small>(Edited by D Willett on 13-Nov-02 13:32. )</P>My Diary form has [PrimaryDate] which alters from day to day using the pageup & pagedown keys.
    The forms recordsource is qryDiary with the date field [DiaryDate].

    [DiaryDate] is bound to [PrimaryDate] via the query, so when pgUp and pgDown are pressed, the recordsource moves to the current date as selected thru the query.
    Some thing strange is happening with this as follows.

    When pgUp is pressed, the current [DiaryDate] and its table contents are shown.
    When pgDown is pressed, the record is not shown.
    Please see attachment.
    The code for the keys are the same other than -1 & 1, so why does the pgUp key only work ??


    Select Case KeyCode
    Case vbKeyPageUp
    Me!PrimaryDate = DateAdd("d", -1, Me!PrimaryDate)
    Me!PrimaryMonth = DateAdd("d", -1, Me!PrimaryMonth)
    Forms!frmDiary.Requery
    Case vbKeyPageDown
    Me!PrimaryDate = DateAdd("d", 1, Me!PrimaryDate)
    Me!PrimaryMonth = DateAdd("d", 1, Me!PrimaryMonth)
    Forms!frmDiary.Requery
    Case vbKeyF10
    DoCmd.Close acForm, Me.Name
    End Select

    The problem seems to be with the ReQuery part.
    After pressing pgDown, If I shift F9 manually.
    The record shows.
    The ReQuery works on pgUP, why not on pgDown ???
    Attached Files Attached Files

  6. #6
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diary Application (A2000 SR1)

    The record is shown for a fleeting second, then disappears indicating that the code is working correctly, but something else is triggered?

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diary Application (A2000 SR1)

    I've removed the input mask from text box "primary date" and it appears to work ok on my machine now!!!

  8. #8
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diary Application (A2000 SR1)

    Now it's NOT working? <img src=/S/sad.gif border=0 alt=sad width=15 height=15> <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  9. #9
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diary Application (A2000 SR1)

    I was just about to ask you to re-post it cos it don't work here.

    I tried another unbound and alterred the query to suit and that doesn't work either. !!

  10. #10
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diary Application (A2000 SR1)

    Hi Dave,

    I was puzzled as to why it started working OK for me, and then stopped again so I retraced my steps and discovered that I could make it work OK again after I had set a break point in the code, but it seems intermittent.

    I went on to do some more tests and discovered the following:

    With the case statement like this:

    Select Case KeyCode
    Case vbKeyPageUp
    Me!PrimaryDate = DateAdd("d", 1, Me!PrimaryDate)
    Me!PrimaryMonth = DateAdd("d", 1, Me!PrimaryMonth)
    Forms!frmDiary.Requery
    Case vbKeyPageDown
    Me!PrimaryDate = DateAdd("d", -1, Me!PrimaryDate)
    Me!PrimaryMonth = DateAdd("d", -1, Me!PrimaryMonth)
    Forms!frmDiary.Requery
    Case vbKeyF10
    DoCmd.Close acForm, Me.Name
    End Select

    The effect is:
    With the Page-up key pressed the date is Ascending and the Text shows OK
    With the Page-down key pressed the date is Descending and the Text flashes and disappears

    And with the case statement like this:

    Select Case KeyCode
    Case vbKeyPageUp
    Me!PrimaryDate = DateAdd("d", -1, Me!PrimaryDate)
    Me!PrimaryMonth = DateAdd("d", -1, Me!PrimaryMonth)
    Forms!frmDiary.Requery
    Case vbKeyPageDown
    Me!PrimaryDate = DateAdd("d", 1, Me!PrimaryDate)
    Me!PrimaryMonth = DateAdd("d", 1, Me!PrimaryMonth)
    Forms!frmDiary.Requery
    Case vbKeyF10
    DoCmd.Close acForm, Me.Name
    End Select

    The effect is:
    With the Page-up key pressed the date is Descending and the Text shows OK
    With the Page-down key pressed the date is Ascending and the Text flashes and disappears

    My conclusion is that the page down key is causing the problem.

    To test this I changed the

  11. #11
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diary Application (A2000 SR1)

    I was about to test other keys but you have answered my suspicion for me.
    So I guess I need to disable momentarily the PageUp & PageDown keys. I'll start searching.

    I tried to disable with Autokeys but that would be global, besides, Access won't let you do that.
    Thanks for the help.

  12. #12
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Diary Application (A2000 SR1)

    Hi Dave,
    I think you should reconsider your position on Access security. You would be reinventing the wheel, and for what you want, security would do the trick with little effort. Besides, if you are going to be considered a serious Access developer, you really need to understand how security works and what functions it can perform. For example, it's a very easy tool for tracking who is adding or changing database records, so you can spot users who need training, etc. To do that all you have to do is enter your list of users in the security menu, and then give the Admin user a password. Then the function CurrentUser() will tell you who is logged and you can save that value on a form or from a table default. Nobody needs to have a password other than Admin, and it easily tracks users as they move from machine to machine. Of course once you do that, you will decide that some users shouldn't be able to access certain forms or reports, and you already have the framework for implementing those kind of restrictions.

    Bottom line - learn about security - it doesn't take all that long and the rewards are substantial. You might start by looking at one of the Access books, but you will also want to read the MS KB articles referenced in <post#=160591>post 160591</post#>.
    Wendell

  13. #13
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Diary Application (A2000 SR1)

    Dave,

    Does it help if you set KeyCode = 0 after Case vbKeyPageDown?

    I assume your code is in the Form_KeyDown event. Setting KeyCode = 0 will prevent Access from handling the PageDown key itself.

  14. #14
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diary Application (A2000 SR1)

    Hans
    Thats done the trick.
    The keys are now trapped, enabling the code to work without confronting Access Constant keystrokes.
    Thanks.


    Wendell

    I know, I know, I know.
    I must, I Will, I Promise to look at security as you have suggested.
    for now, I'm kicking and screaming like a kid at the dentist.

    Joking aside, thanks all again.

  15. #15
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Diary Application (A2000 SR1)

    Hans
    Just a thought.
    I putting Keycode=0 after my case statement was all that was needed, Could this have been the answer to my recent problem with my Autokeys, in fact, was there any need at all for an Autokeys macro in the first place.

    Obviously if so, then others can learn from this if they have the same unfixable autokeys macro problem.

    If you remember I had to re-install my Operating system.
    I'm glad I did though, Windows XP is far better I feel.

    Thanks again

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •