Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879


    Quote Originally Posted by Rotsjk View Post
    Hi moke123,

    i cannot see the code you've posted.
    Thank you!
    I only posted your code with indents and code tags so its readable.

    My point was you need to set cancel = true.

    Your cancel argument could be as simple as
    Code:
    cancel = DCount("nummer", "bonnen_status", "nummer=" & Me.Nummer & " and soort=" & Me.Soort)
    But we dont know enough about your data to be precise.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  2. #17
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    Quote Originally Posted by jojowhite View Post
    i would not recommend doing anything in a Validation event.
    use the event for it's sole purpose, that is to Validate.

    if you need to Insert/Update, validate it first then
    invoke the Timer Event and do the Inserting/Updating
    on that event.

    also, are you trying to Update (using SQL) the same record
    that is in the subform? if so that is a no, no (the db engine
    will give you warning about conflicting records).
    I'd be more inclined to use the afterupdate event than a timer, but yes the beforeupdate isn't the place to be adding records.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 08-01-2018, 10:02 AM
  2. Replies: 10
    Last Post: 04-01-2018, 07:45 AM
  3. Clear a combo box if the entry is updated
    By CT_AccessHelp in forum Forms
    Replies: 2
    Last Post: 12-10-2013, 12:15 PM
  4. Replies: 2
    Last Post: 04-24-2013, 11:52 AM
  5. Command button code to clear form
    By windwardmi in forum Forms
    Replies: 15
    Last Post: 11-21-2010, 03:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums