I am hoping that someone can guide me in the right direction here because I am wandering around lost! 
What I have is a Main form and within that a subform. The users input into these forms and the data goes straight into 2 tables.
On the Main form I have a Save Record button and a Close button. Now the problem I have is that if the user accidentally starts inputting and then decides to close the form the record still gets saved.
Is there a way to check whether there is data in the main form and the subform – if there isn’t close the form as normal but if there is ask the user if they want to save or close without saving ?
cheers
Wrightie

What I have is a Main form and within that a subform. The users input into these forms and the data goes straight into 2 tables.
On the Main form I have a Save Record button and a Close button. Now the problem I have is that if the user accidentally starts inputting and then decides to close the form the record still gets saved.
Is there a way to check whether there is data in the main form and the subform – if there isn’t close the form as normal but if there is ask the user if they want to save or close without saving ?
cheers
Wrightie