Results 1 to 9 of 9
  1. #1
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Use of YesNo message box to designate action (A2k)

    When a user changes a value of a certain field for any of my records, I record that action, adding a new record to a change log. I would like to ask them if they would like to enter comments about the action, or if they would like to continue on. In the case that they want to enter comments, set the focus on a memo box, and then add the record to my change log. If they don't want to enter comments, simply add the record to the change log. I am at a loss as far as how to code this. I know I can do it by creating another form that looks like a message box with a Yes and No command button, however I'd trying to "broaden my horizons", and was wondering how useful the YesNo message box is, as well as the syntax of how exactly to use it.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

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

    Re: Use of YesNo message box to designate action (A2k)

    You could use an InputBox:

    Private Sub CertainField_AfterUpdate()
    Dim strComment As String
    strComment = InputBox("Enter comments here if you wish")
    If Not strComment = "" Then
    Me.Comment = strComment
    End If
    ' code to add record to log goes here
    ...
    End Sub

    A MessageBox only lets the user click a button, you cannot use it for any other input.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Use of YesNo message box to designate action (A2k)

    Exactly the type of answer I was looking for...I didn't even know about input boxes...good thing I got a new Access book today. I can't sit here and pick your brain all weekend <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

    Thanks!
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

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

    Re: Use of YesNo message box to designate action (A2k)

    Which book did you get?

  5. #5
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Use of YesNo message box to designate action (A2k)

    I've actually got 3 now, and I'm working through them *slowly*. The one I just received seems like the most understandable....they're listed below (from most recent to oldest)

    Access Database Design & Programming by Steven Roman
    Beginning Access 2000 VBA by Robert Smith and David Sussman
    Access 2000 Bible by Cary N. Prague and Michael R. Irwin

    Recommendations? Are these good/bad?
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  6. #6
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Use of YesNo message box to designate action (A2k)

    I haven't read it but

    Access 2000 Bible by Cary N. Prague and Michael R. Irwin <img src=/S/yep.gif border=0 alt=yep width=15 height=15>

    I have always found this series of books very very useful....trouble is the boss won't buy books at present due to the restructure....maybe my new one will <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>
    Jerry

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

    Re: Use of YesNo message box to designate action (A2k)

    I don't know the "Access 2000 Bible". "Beginning Access 2000 VBA" is good, and "Access Database Design & Programming" is really excellent - you can learn a lot about designing databases from it.

    The real "bible" is the Access 2000 Developer's Handbook (2 volumes) by Litwin, Getz and Gilbert, from Sybex. It's not for beginners, and it is not suitable to learn Access from, but it contains a wealth of information for developers.

  8. #8
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Use of YesNo message box to designate action (A2k)

    Well if I learn *something* from each of them then it hasn't been a waste of money. Perhaps after I work through these 3, I'll move on to the real "bible".
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  9. #9
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Use of YesNo message box to designate action (A2k)

    I'm happy to be making good purchases then.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

Posting Permissions

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