yes no button - save record and add another or save and close

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

ok.. I've been looking at it and looking at it.. and it's not making any more
sense...

I have a have that is for adding records only. Now I have a button that says
confirm and pops up a yes no msgbox. I trying to program it so that if you
click yes it saves the current record and starts a new one. If you click no
it saves the current and closes it.

Suggestions?!?!? Help!? Please!

Thanks!!
 
I do not quite understand what you are trying to do but if you want to do
something with the result of a messagebox, this might help

Dim intResult as integer

intResult = Msgbox(Do you want to exit", vbyesno, "Exit?")
If intresult = vbyes then
' Whatever you want to do for Yes
Else '
' whatever you want to do for no
end if

If you are trying to add/delete records, you may want to include (before the
delete command)
Docmd.setwarnings false
to avoid all the message boxes
Hope this helps
 
Sorry... I think I was tired when I sent in the question...

I have a form that is for adding records only. On the form I want a button
called CONFIRM which pops up a msgbox that asks "Save this record and add
another - press yes" or "Save this record and quit - press no"... Your code
is what I've been trying do but I'd been looking at it and looking at it for
a while and couldn't quite get it to work. Let me test it out and I'll reply
back.

THANKS!!
 
Back
Top