Results 1 to 6 of 6
  1. #1
    Heathey94 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2015
    Location
    United Kingdom
    Posts
    282

    Closing Forms without saving the record... and more

    Hi, I'm creating a database which allows an someone to input details about a child, an assessment on the child and the person who completed the assessment form. I have attached my database for you to view and assist, if you need any more information just ask and I'll see what I can do

    Anyway, I have many issues but one main big one: is there a way to close a form without applying any changes made to the record (or without adding the record if this is applicable) in the same way that closing a window on the internet loses the information you entered? I would want this on practically every page, this is what the 'back' button would do.

    Also if you have any recommendations on how to improve my database in any other way - such as relationships etc. I am willing to learn - it has been quite some time since I last used Access prior to this project.

    Note: I recently altered a large portion of my database which is why many of the links do not work. Also, the forms which begin with an 'o' are from the old version of my database and are there so that I remember to include them (and what they had on) in the updated version.



    Thank you in advance!
    Attached Files Attached Files

  2. #2
    JeroenMioch's Avatar
    JeroenMioch is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Location
    Den Haag, Netherlands
    Posts
    368
    You can use the form.undo function to undo all changes made since the form was opened.
    You can apply this to controls individually as well of course. me.YourControl.undo

  3. #3
    Heathey94 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2015
    Location
    United Kingdom
    Posts
    282
    Great, thank you!

    My other big problem is my Low/Medium/High Risk Assessment Forms, if possible I would like them displayed similarly to in the original form:
    Click image for larger version. 

Name:	Assessment Form Word.PNG 
Views:	24 
Size:	34.9 KB 
ID:	23499
    But I was advised against the way I had it in my original forms ("oLowRiskAssessment" etc.) as this resulted in tables that were not normalised, have you got a solution that would do this?

    The only other way of doing it that I can think of is to go through and enter the information with one question displayed at a time but I would prefer not to have to select each question as this could mean one gets missed.

    Thanks again.

  4. #4
    JeroenMioch's Avatar
    JeroenMioch is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Location
    Den Haag, Netherlands
    Posts
    368
    I took a look at your database and i think its hard to see what you have going on.
    I see a lot of tables with child data (not sure if its the right word) and i have never used that before.

    You will have to explain the purposes and procedures of what your trying to make for us to give a good advise.
    One thing i can advise you in the meantime is to standardize the way your forms and control names, like your doing with your querys and tables.

    Tables (tblYourTableName)
    Query's (qryYourQueryName)
    Forms (frmYourFormName)
    Controls (ctrlYourControl)
    Fields (fldYourFieldName)
    Buttons (btnYourButtonName)

    etc etc.

    This way when you start programming in visual Basic you immediately know if your code is about a field, form, control or what not.

  5. #5
    Heathey94 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2015
    Location
    United Kingdom
    Posts
    282
    OK, so:

    Tables:
    tblChild - details about each child
    tblAssessor - details about each assessor
    tblTeam - a list of the possible teams an assessor can belong to
    tblDistrict - a list of the possible districts a team can belong to
    tblBehaviour - the access version of the image I posted above
    tblRisk - there are 3 types of behaviour risk, low medium and high - now I think about it this is probably not needed, I could just have it in the tbl Behaviour
    tblAssessmentDetails - the response to each question on the assessment
    tblAssessment - information on each assessment, this is mainly just to link the other tables and state the date of the assessment

    Queries:
    qryAddHighRiskAssessment - this pulls through the behaviours listed as high risk for the information needs to be added. I will create medium and low when I get chance
    qryAssessmentRecord - finds the assessment information (from the assessment table)
    qryAssessor - allows the user to check if an assessor is in the table already (preventing double entries)
    qryAssessorCases - finds the children with assessments with a certain assessor
    qryChildRecord - finds the details of a child from the child table
    qryEditBehaviour - pulls in the behaviours so they can be edited
    qryHighRiskAssessment - finds the high risk assessment behaviours (for viewing or editing)
    qryMediumRiskAssessment - finds the medium risk assessment behaviours (for viewing or editing)
    qryLowRiskAssessment - finds the low risk assessment behaviours (for viewing or editing)

    Forms:
    Homepage - the first page, I will want this to automatically open when the database is opened, is this possible? You can search for children, assessors and behaviours or go to a form to add them
    AddAssessor - allows you to add the assessor, takes you to the assessor records page when added
    AssessorRecords - shows you the assessor details from the assessor table
    AssessorCases - based on the query of the same name
    AddChild - same as AddAssessor but for the child table
    ChildRecord - same as AssessorRecord but for the child table
    AddBehaviour - same as AddAssessor but for behaviour table (I just thought of a better way of doing this)
    EditBehaviour - same as AddAssessor but for behaviour table (I just thought of a better way of doing this)
    AssessmentRecord - opens the first assessment for a child (would be better if I can change this to last)
    AddAssessmentRecord - adds an assessment to the assessment table
    LowRiskAssessment - opens the corresponding low risk behaviours for the assessment ID from the AssessmentRecord form. Also allows the user to edit the comments/tick boxes for the behaviours and add some if they were missing
    MediumRiskAssessment - opens the corresponding medium risk behaviours for the assessment ID from the AssessmentRecord form. Also allows the user to edit the comments/tick boxes for the behaviours and add some if they were missing
    HighRiskAssessment - opens the corresponding high risk behaviours for the assessment ID from the AssessmentRecord form. Also allows the user to edit the comments/tick boxes for the behaviours and add some if they were missing
    AddLowRiskAssessment - adds the low risk behaviours to the assessment details table
    AddMediumRiskAssessment - adds the medium risk behaviours to the assessment details table
    AddHighRiskAssessment - adds the high risk behaviours to the assessment details table

    I think that's everything, if not or its not clear enough just let me know.

    I knew the practice was to include it on forms as well but since a non-access user would be using it, I felt it was just an unnecessary addition, I also didn't know you normally do it on buttons etc as well. I think I'll be fine with regards to this as it is though.

    Also something I meant to add, just one person will be using the database so any specific protocol for using it can be run by them.

  6. #6
    Heathey94 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2015
    Location
    United Kingdom
    Posts
    282
    I just realised I included some forms I haven't created yet - the AddHighRiskAssessment forms etc. but at least you now know what the old versions of these forms are for (and the new ones when I come to them).

    I also missed the subforms - these are just to pull through the risks so they are displayed as similar to the old version as I can (one listed below the other, like in the image above)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Closing form without saving data
    By Thompyt in forum Programming
    Replies: 5
    Last Post: 03-28-2015, 02:55 PM
  2. Closing access database without saving
    By onaggar in forum Access
    Replies: 7
    Last Post: 12-19-2013, 06:23 PM
  3. Closing the form without saving the information
    By selvakumar.arc in forum Forms
    Replies: 5
    Last Post: 12-11-2013, 08:50 AM
  4. Closing Datasheet Forms Within Each Other
    By jfriedm in forum Access
    Replies: 11
    Last Post: 11-23-2012, 03:31 PM
  5. Closing and saving a form
    By Lxmanager in forum Forms
    Replies: 14
    Last Post: 11-21-2010, 02:04 AM

Tags for this Thread

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 - Senior Forums