Recent content by Notiophilus

  1. Notiophilus

    Bypass Form_BeforeUpdate validation when switching to a subform

    That's what I said in my previous comment. The subform is bound to tblStoryAuthor (the junction table). And yeah, I'm using NotInList - almost every story I add has a new author, so it would be a pain to have to add each one separately. ...although you definitely have a point here! Since this...
  2. Notiophilus

    What do the events Form_CommandExecute, CommandChecked, CommandBeforeExecute etc actually DO?

    Hm, that makes sense - some of the links I found were for Access 2003, so ¯\_(ツ)_/¯ Thank you both for indulging my curiosity!
  3. Notiophilus

    Bypass Form_BeforeUpdate validation when switching to a subform

    The table structure, heavily simplified, is as follows: tblStory [PK: storyID, title, summary, words] tblStoryAuthor [storyID, authorID] - multiple authors allowed per story, although normally there's only one tblAuthor [PK: authorID, name] tblStoryCategory [storyID, categoryID] - multiple...
  4. Notiophilus

    What do the events Form_CommandExecute, CommandChecked, CommandBeforeExecute etc actually DO?

    Access 2010. Trying to understand more about event order on forms, I ran into the Form events CommandBeforeExecute, CommandChecked, CommandEnabled, and CommandExecute. They look intriguing and possibly useful, but what do they actually do, and what triggers them? According to Microsoft's help...
  5. Notiophilus

    Bypass Form_BeforeUpdate validation when switching to a subform

    Eeesh, I feared as much. Oh well, I'll leave it as an option for the future. Thanks!
  6. Notiophilus

    Bypass Form_BeforeUpdate validation when switching to a subform

    hahaha whoops yeah, that's an error in my post - I was on autopilot. Actual code is okay. and yep, that's all I can see. It just feels a little awkward to give the user the choice to delete the record (if they're just clicking on a subform) or not to delete the record (if they're navigating...
  7. Notiophilus

    Bypass Form_BeforeUpdate validation when switching to a subform

    Yep. The only time I really want validation is when I leave the record, either by closing the form or navigating to another record. (e.g. some other parts of the form create child records, and in such cases I force a SaveWithoutValidation. This works fine.)
  8. Notiophilus

    Bypass Form_BeforeUpdate validation when switching to a subform

    I have a bound parent form with two subforms. If the user tries to leave a record without having entered certain key data (title, summary, link), the form challenges them: they can either cancel and stay on the record to enter the missing data, or keep going, and the incomplete record will be...
  9. Notiophilus

    Solved Nz(control.DefaultValue) returns Null, not 0 or "". Why?

    ...the default value is "Null". Not Null, but "Null". It's a string. Jesus Christ on a bike. I create my own problems.
  10. Notiophilus

    Solved Nz(control.DefaultValue) returns Null, not 0 or "". Why?

    I'd heard that before, but I keep forgetting it. Good to be reminded! @theDBguy, here you go: For Each ctl In Me.Form.Controls If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox Or ctl.ControlType = acCheckBox Then If ctl.Tag & "" <> ctl.DefaultValue & ""...
  11. Notiophilus

    Solved Nz(control.DefaultValue) returns Null, not 0 or "". Why?

    Wrote it into debug. What alerted me was that ctl.Tag (which defaults to "") <> Nz(ctl.DefaultValue,""), so the bookmark code was storing a bunch of empty controls unnecessarily. (eta: also damn you're fast)
  12. Notiophilus

    Solved Nz(control.DefaultValue) returns Null, not 0 or "". Why?

    ETA: IGNORE EVERYTHING, I'M AN IDIOT I have some filter controls on my form whose values I save to a bookmarks table on Form_Unload. I save them if and only if the control value (stored in .Tag) <> the default value. Some default values are null, e.g. triple-state checkboxes, so I stuck a Nz on...
  13. Notiophilus

    Solved On Error Resume Next : Exit Sub... why?

    Interesting. Thanks for the explanation!
  14. Notiophilus

    Solved On Error Resume Next : Exit Sub... why?

    Ah, so it's just a leftover of normal good practice. Makes sense, thanks!
Top Bottom