Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Accidental overwriting data (97)

    Good afternoon

    My database has the perennial problem of users not knowing how to use Access (and an administrator who doesn't know how to programme in Access, but that's another matter!)

    Some of the users overwrite the first record in an attempt to create a new record instead of clicking on the asterix in the navigation bar at the bottom of the form.

    I've put a "New Customer" button on the form that opens a blank form and added the following code to the text box of the first field on the form:


    Private Sub CompanyName_BeforeUpdate(Cancel As Integer)

    MsgBox "Please don't alter the Company Name text" & Chr(13) & Chr(10) & "Click the New Customer Button to create a new customer" & Chr(13) & Chr(10) & "Unless you're entering a new customer now in which case please ignore this message, I don't know how to stop it appearing on a new customer!", 0, "New Customer"

    End Sub


    This code reminds users not to overwrite the first field on the form but puts the message box up on a new record when it's not needed.

    I wanted to keep the main form in edit mode as I try to encourage the users to correct incorrect or out of date information.

    Can I code the message box to not show when the form is blank for a new record or should I be looking at this from another angle?

    The clouds are gathering from the north, I think it's going to snow.

    Regards

    Graeme

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

    Re: Accidental overwriting data (97)

    You can insert a line

    If Me.NewRecord Then Exit Sub

    immediately above the line starting with MsgBox.

  3. #3
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Accidental overwriting data (97)

    Hans

    I really must learn some more about this coding business! That was such a simple answer to what I thought was a tricky problem.

    All I have to do now is wait till after five when everybody's shut down the database and gone home in order to do the design change!

    Thanks

    Graeme

  4. #4
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Accidental overwriting data (97)

    Hi Graeme

    If you split your app into Fe and Be db, you can do design changes when they need to be done and then let the end user refresh there copy of Fe.

    Fe = Querys, Forms, Reports, Modles
    Be= Tables

    If your going to get serious in application development, Charlotte recommends and I agree, dealing with empty record sets. Your working with one record at a time, with Add, Save button and Lookup Criteria, etc

    To review these topics, you may be able to do forum search on:

    split front end and backend database
    split database
    split a database

    empty record sets
    My users work with one record at a time

    HTH

    John

  5. #5
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Accidental overwriting data (97)

    John

    Thanks for that.

    I've been reading stuff that I've come across on splitting the database and security issues generally.

    There are now up to 70 people who have access to my database and there are about 12 or so in it at any one time across the company network. There's a lot of information in it and I'm conscious of how vunerable it is!

    Oh well at least I've sorted out my User Pic!

    Regards

    Graeme

  6. #6
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Accidental overwriting data (97)

    Wendell

    Thanks for that.

    I saw the User Security item when I started doing this database thing, when I knew even less than I do now! The subject was too tricky then, I'll read it again.

    The database is on a server dedicated, shared drive with access limited to a list of people. Most of these people work at remote locations and their network connection is on their local server. These users find the database painfully slow. It works fine for the users who's server is the same machine as the dedicated drive is on. For this reason it would be good to split the database and roll out the front end on the user's machines. I need to talk to our IT people about this.

    We'll get there in the end!

    Regards

    Graeme

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

    Re: Accidental overwriting data (97)

    Hi Graeme,
    You might find our tutorials on Database Splitting and User Security useful in exploring ways to prevent users from mangling data. You could also lock the Company Name field unless it's a new record as well.
    Wendell

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

    Re: Accidental overwriting data (97)

    <hr>Most of these people work at remote locations and their network connection is on their local server. These users find the database painfully slow. <hr>
    Unfortunately, I doubt splitting the database will solve that problem - though splitting your database is a good idea for numerous reasons. Your problem is the link from the remote server to the local server - even with 1.5MB T1 link you will find it slow. When you start moving forms and reports over a WAN link - you get the kind of performance you have now. Moving the forms eases things a bit, but you still have to pull the data over the WAN. You would probably be better off to look at Citrix, Terminal Services, or one of the remote access products such as PC Anywhere. They simply send keystrokes and screen paints back and forth - I've managed to successfully work on a 640K DSL circuit and actually do design work on the remote database. We are currently doing that with a client on the West Coast from Colorado.
    Wendell

Posting Permissions

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