Search results

  1. S

    Prevent form/record update

    Well thanks for your input Pat but I've tried applying your code and unfortunately it doesn't have the desired effect. I tried to edit it a bit to fit my need but still no luck. The crux of this is the msg box that both informs the user that they are unable to save the record with the empty...
  2. S

    Prevent form/record update

    Believe me I tried, nothing happens if I use that.
  3. S

    Prevent form/record update

    ZOMG! I've only gone and done it... Just thought I'd try a little theory and it worked. Private Sub cmdNew_Click() On Error GoTo Err_cmdNew_Click If IsNull(Me.CourseName) Or Me.CourseName = "" Then If MsgBox("No course name entered, continue without saving?", vbYesNo, "Can't save...
  4. S

    Prevent form/record update

    lol maybe :-P Morning anyway, or evening... whatever time it is over there. So I tried that, didnt work. Was close though. Below is the slightly edited version, which does the same thing. The emboldened code is what I had to change/add. Private Sub cmdSave_Click() On Error GoTo...
  5. S

    Prevent form/record update

    Ye, you're right. It did work actally, but I also checked before posting. Must have not done it right the first time. Anyway, on another note: I've come up with sometthings that seems to be doing the trick for the 'save/close' or 'menu' button. I've declared the following variable which is...
  6. S

    Prevent form/record update

    The cursor does not automatically apear unless I set the focus despite the field being the first tabstop. The menu is not open in the background so I need to open it when this one is closed. As such I need to specify the form to be closed. If it was: DoCmd.Close DoCmd.OpenForm "frmMenu" Then...
  7. S

    Prevent form/record update

    This is the code for both, my new record and save/close buttons. The save/close button is more of a return to menu button, but the 'save' is there to give users the benefit of the doubt since they would be unaware and wory whether it's saved. Private Sub cmdNew_Click() On Error GoTo...
  8. S

    Prevent form/record update

    Hi Rain. Yea, it works as much as stopping the record from being saved. But the code of the button that initiated the update still runs... If the Save & Close button was clicked it still closes and goes to the main menu. Edit: I have stoped this by putting an error handler on in the sub [If...
  9. S

    Prevent form/record update

    Thanks for coming in on the thread jdraw. I don't dissagree that the BeforeUpdate is part of how to do this but simply that anything I've tried with it hasn't worked. Ok I had a look at the link, but both the examples on that page are using BeforeUpdate events of those specific fields. I'm...
  10. S

    Prevent form/record update

    I've thrown together a diagram to show exactly how I'd expect/hope my form to act under the three possible circumstances. Saves you trying to make sense of my poor explanation skills.
  11. S

    Prevent form/record update

    Thanks for your reply RainLover. However as mentioned in my post, I have tried using various methods in the BeforeUpdate event. I will illustrate the problem using an example with the following code in the BeforeUpdate event of the form: Private Sub Form_BeforeUpdate(Cancel As Integer) If...
  12. S

    Prevent form/record update

    Hi all I'm in dire need of some help to come up with a solution for something I've been struggling with for some time now. I have a data entry form for users on which they can create, edit & delete records. Essentially I don't want to allow the form to append any newly entered data to the...
  13. S

    The New Kid

    Hi all Just thought I'd throw down a quick howdy to everyone. Just joined the forum, looks like a great place. I've had a few access related queries which haven't been solved on other sites, which were general tech support forums. So I'm hoping this will prove more usefull as a dedicated Access...
Back
Top Bottom