Form close button, do not want Save prompt

rob.lyles

Registered User.
Local time
Today, 05:17
Joined
Sep 2, 2009
Messages
34
Hi,
I've seen a lot of posts out there on this, but I can't find any replies geared to what I am looking for. I am using a very simple form bound to a 1 record, 2 field table that has a textbox and 2 command buttons. This form's properties are set not to allow additions, not to allow deletions, has no record selectors, and I set the cycle to current record. My whole thought here was to allow the end user to only be able to update 1 field and 1 record, and when any new update occurs, it only affects record #1, and field bound to textbox. It seems to be working just fine for that aspect.

For the command buttons, I want a save button, and I want a close button, which I have already created. I want them to do just what their name implies, nothing more. I do not want any prompts or anything like that upon clicking these buttons as I just want them to do their job. Moreoever, I don't want a single button that saves and close. The whole thought, is that the enduser is going to enter a value in the textbox, and then save. That enduser may realize they typed the wrong value, and may want to re-enter the data and save again to correct without having to re-open this form to do so. Maybe they entered and saved valid data, but just realized they would like a different value after being able to think about it, so they would like to re-enter, save, then close.

The save button works great. I just drew a command button, and I followed those prompts to assign it to save the record, under the record operations category of the wizard. However, when I drew the close button, and went under form operations to choose Close Form, it closes just fine but I get prompted to save as well. I would like this save prompt to just go away somehow, as this is redundant to the record operations action: Save Record.

So in short, I need this form to be user friendly for folks who will probably not be learning more than how to click on a button and enter simple data. So it should be able to enter data on 1 record only as it does, have a button to save that data, and a button to close that form.

Thanks for any help!
R
 
The close button should have the code EXACTLY like this (do not change any part of it):

DoCmd.Close acForm, Me.Name, acSaveNo

the acSaveNo part will get rid of the prompt (which the prompt is the default).
 
This does work thank you. However, if I am in design view, and then switch to form view on this particular form, the form just goes blank. Although it works when I navigate from the switchboard to this form, then click close. When I choose the form from the switchboard, the form opens up with all of the buttons and functions well. If I were to switch to design view, then go back, there is absolutely nothing in the form at all. Just background. Any thoughts on this? Thanks for the help.
 
Yeah, it all depends on how the switchboard is opening the form. If there are any filters or such in the open statement.
 

Users who are viewing this thread

Back
Top Bottom