UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Open form as new    
 
   
Ozarka
post Oct 27 2006, 12:02 PM
Post #1

UtterAccess Veteran
Posts: 462



DoCmd.OpenForm stDocName, acNormal, , acFormAdd, , acDialog

I am using this script to open a form. i dont want record to be saved if there was no entry performed. this add a empty record whenever end users decide to leave the newly open form without performing any data entry.
Go to the top of the page
 
+
Aquadevel
post Oct 27 2006, 12:08 PM
Post #2

UtterAccess VIP
Posts: 6,898
From: Earth...



OZ,

Why aren't you just using:

DoCmd.GoToRecord , , acNewRec

to have the user go to a 'blank' record?

Aqua
Go to the top of the page
 
+
MikeLyons
post Oct 27 2006, 12:08 PM
Post #3

UtterAccess VIP
Posts: 1,857
From: BC, Canada



You could make certain fields Required in the table design.

If that is not an option, you could enforce entry through Validation Rules in the form.

Mike
Go to the top of the page
 
+
Ozarka
post Oct 27 2006, 12:18 PM
Post #4

UtterAccess Veteran
Posts: 462



aqua - ur method did not wor

i have a main form

button # 1 > open existing record (people can select a record from combo box and then view it but using another form)

button # 2 > create new record
Go to the top of the page
 
+
Ozarka
post Oct 27 2006, 12:49 PM
Post #5

UtterAccess Veteran
Posts: 462



so there is no way to open a from from another form and not save as a record till user manually input some data.
Go to the top of the page
 
+
freakazeud
post Oct 27 2006, 02:25 PM
Post #6

UtterAccess VIP
Posts: 31,413
From: NC, USA



Hi,
Set the Data Entry property of the form to YES...this is the only thing you should need...if the form opens up and NOTHING was touched then it should be able to close without saving the record...if there was changes then you need to use code on the close button or the before update event of the form to check if everything was filled out or not and if you want to save that or not e.g.:

If Me.Dirty = True Then
'loop through controls to check if all are non empty
'decide if you want to undo changes with Me.Undo or let the user enter the rest if some are empty
End If

HTH
Good luck
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 04:11 AM