Form append mode?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Codebug
    New Member
    • Feb 2008
    • 25

    Form append mode?

    How can you check if a form is in append mode (ie new record)
    Code:
      If MyForm = '  Append Mode ? Then
       
          ' my code
    
       End If
    Last edited by Codebug; Feb 22 '08, 08:08 AM. Reason: Posted before completion
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Something like
    [code=vb]
    If MyForm.DataEntr y Then ....
    [/code]

    Regards.
    Fish

    Comment

    • Codebug
      New Member
      • Feb 2008
      • 25

      #3
      Thanks,

      overlooked the obvious

      Comment

      • FishVal
        Recognized Expert Specialist
        • Jun 2007
        • 2656

        #4
        Not a problem.
        Good luck.

        Comment

        • missinglinq
          Recognized Expert Specialist
          • Nov 2006
          • 3533

          #5
          Originally posted by Codebug
          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:

          Code:
          If Me.NewRecord Then
            'Place your code here
           End If
          Welcome to TheScripts!

          Linq ;0)>

          Comment

          • Codebug
            New Member
            • Feb 2008
            • 25

            #6
            Yes thanks, NewRecord that worked!

            Comment

            • missinglinq
              Recognized Expert Specialist
              • Nov 2006
              • 3533

              #7
              Glad we could help!

              Linq ;0)>

              Comment

              Working...