By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,576 Members | 1,439 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,576 IT Pros & Developers. It's quick & easy.

Form append mode?

P: 25
How can you check if a form is in append mode (ie new record)
Expand|Select|Wrap|Line Numbers
  1.   If MyForm = '  Append Mode ? Then
  2.  
  3.       ' my code
  4.  
  5.    End If
Feb 22 '08 #1
Share this Question
Share on Google+
6 Replies


FishVal
Expert 2.5K+
P: 2,653
Something like
Expand|Select|Wrap|Line Numbers
  1. If MyForm.DataEntry Then ....
  2.  
Regards.
Fish
Feb 22 '08 #2

P: 25
Thanks,

overlooked the obvious
Feb 22 '08 #3

FishVal
Expert 2.5K+
P: 2,653
Not a problem.
Good luck.
Feb 22 '08 #4

missinglinq
Expert 2.5K+
P: 3,532
How can you check if a form is in append mode (ie new record)
Fish's code will work if the form is opened using acFormAdd or if the form's AllowAdditions property is set to Yes, but if by "if a form is in append mode" you simply mean that you've moved to a new record,as opposed to an existing record, you need to use something like this:

Expand|Select|Wrap|Line Numbers
  1. If Me.NewRecord Then
  2.   'Place your code here
  3.  End If 
Welcome to TheScripts!

Linq ;0)>
Feb 22 '08 #5

P: 25
Yes thanks, NewRecord that worked!
Feb 26 '08 #6

missinglinq
Expert 2.5K+
P: 3,532
Glad we could help!

Linq ;0)>
Feb 26 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.