Exit forms without saving
and also, right now, if I click NO when I am asked if I want to delete this record, it exit the form rather than staying in the same form.
But how do I make it to STAY in the same form if I click NO.
Private Sub Command24_Click()
On Error GoTo Command24_Click_Err
On Error Resume Next
If (MacroError <> 0) Then
MsgBox MacroError.Description, vbOKOnly, ""
Exit Sub Command24_Click_Err:
Thank you for taking the time to report an issue.
What's wrong... Please write below.
There is a command button in the main form for 'Exit without saving'. Some of the fields in the main form and subform is in required fields.
The code works perfectly fine if I have started answering some questions in the main form only but it did not work when I start to answer questions in the subform and when I try to save and exit.
It tells me that I need to answer some fields before I exit. How do I get the subform to be working?
I'd like to be able to save the changes to the form properties on exit, but it's apparently beyond me. (Although I do have one form that manages to save the changes. But I can't figure out why or what the difference is between that form and the rest!) I've even tried opening the forms in design mode.
- I have Win XP.
- I have at least 1GB of ram.
- The MDB file is on a C: drive, which uses only 25% of the space. So at least 75% of C: is free space.
- I am linked to some other tables in another application, which resides on a network, through ODBC drivers. But no forms use these tables, and why would these tables be accessed while saving a form in design mode?
- This doesn't happen to my other Access apps. Some of which also use ODBC linked tables.
- My MDB file is in My Documents and is only 1700kb in size.
- I did do Compact and Repair several times this week, but that didn't speed up saving forms.
Any ideas how to speed up saving forms
Then I have to exit the form without saving it. As I now cannot edit it (because it won't save!) I decided to delete it and use a copy of it.
I have looked through the security options, everything is set to Admin.
' Exit the application.
1) Case conCmdExitApplication
This does not actually Exit the Application as I would like. It only closes the db. I would like to close the db and exit Microsoft Access completely.
When they my Exit button on frmOrderDetails, it closes that form, and leaves you looking once again at frmOrders.
Here is my problem. A few fields appear on both forms. For instance, DeliveryDate. If someone goes into frmOrderDetails and updates the DeliveryDate field, when they click exit, I want that new DeliveryDate to be appearing on my frmOrders screen. I thought it'd be as simple as attaching the following to my Exit button:
It seems to work fine for me, but I have complaints from users who say that they still don't get a refreshed screen until they exit out and open frmOrders again. Doing a .Requery definitely works, but it also undoes any sorting or filtering the user has already done, so I'd like to skip that.
If someone can tell me how to make certain that the frmOrders form is correctly being refreshed,
I do not want this to happen. I had written a vba code to set the form to read-only thinking that would help, but it hasn't.
Here's the code I used to make the form read-only and for it to open to a blank form:
I have a couple other forms as well, such as an add record form, an update record form, and a delete record. I made separate forms, so we could better control our documents as all are restricted with passwords, except the search record form.