Recent content by Sharky II

  1. S

    Invoice cleared date set only when all subform items are marked as 'clear'

    Hi, So, the problem arises when i have the call to update parent in the main form's current method. Even when i use the old section of the code: If AllCleared Then '-- All records have a valid date Me.Parent.OracleClearDate = MyDate Else '-- Clear any existing date...
  2. S

    Invoice cleared date set only when all subform items are marked as 'clear'

    I think it's 'fixed'! By accident, of course. I simply removed the line: Me.Child24.Form.UpdateParent from the main current method I'll keep testing because i don't really understand why it's working at the moment, so i wouldn't be surprised if i'm missing something important. But as far as...
  3. S

    Invoice cleared date set only when all subform items are marked as 'clear'

    I thought that feature was just for macros. I'll try that now Also, the call doesn't really need to be in the main current anymore - i went in and 'updated' the 500 records in the database by loading up the form with the call in the main form, and it updated all the 'erroneous' entries, so...
  4. S

    Invoice cleared date set only when all subform items are marked as 'clear'

    Yes, here's my current for the main form: Private Sub Form_Current() Dim q As Date q = Nz(DLookup("AllowEditDate", "AllowEditsDateTable"), "1/1/1900") If q = "1/1/1900" Then Me.AllowEdits = True Me.AllowDeletions = True Else If q >=...
  5. S

    Invoice cleared date set only when all subform items are marked as 'clear'

    There's no 'error' now, same as when i had it as black/white, but it still shows 1899 on a new record (in normal black colour).
  6. S

    Invoice cleared date set only when all subform items are marked as 'clear'

    Hey RG - thanks once again. Any idea why i'm getting a syntax error on the line: Me.Parent.OracleClearDate.ForeColor = #000000 Changing them to the words 'black' and 'white' respectively didn't work. The bg colour is actually #F5F5F5, but that's neither here not there. Any ideas? I'll keep...
  7. S

    Dealing with 'if null' syntax when locking old records (VBA)

    The format property for the text box on the main form OracleClearDate is mm/yyyy :) This is because the employees only get/know their oracle dates by month, so even though really they're entering any day in that month, really the main thing they want to see is the month, so it works 'ok' for...
  8. S

    Invoice cleared date set only when all subform items are marked as 'clear'

    Hey RG - the code works well, but i'm trying to fix an issue where: If someone fills in the main form but doesn't enter an item in the 'subform' (e.g. they didn't finish entering the item details or the form is new) - then the Oracle Clear Date is 12/1899. If you click on the box, then the...
  9. S

    Dealing with 'if null' syntax when locking old records (VBA)

    Hey there! I could - but is that what would be causing the error/date to be filled in - do you think? I will try to remove the date formatting on the form field and see if it fixes the issue, and report back (not at my machine right now, will try tonight!). I'm also not sure what this means...
  10. S

    Dealing with 'if null' syntax when locking old records (VBA)

    Well, actually it is a bit of a problem! I was confused earlier - but i believe the problem lies with the code we were talking about earlier. If someone fills in the main form but doesn't enter an item in the 'subform' (e.g. they didn't finish entering the item details or the form is new) -...
  11. S

    Dealing with 'if null' syntax when locking old records (VBA)

    Hi - well OK it could have been done more efficiently, but it works! :D I actually had it in the On Current event to correct some errors that were inputted by users before i had this code. Now i have this code and have fixed those errors, i can take it out of the On Current event. So no problem...
  12. S

    Dealing with 'if null' syntax when locking old records (VBA)

    Here it is - it was created very kindly by one of the forum regular's here. There is a field on the main form (called Transaction) called 'OracleClearDate'. There's a subform (TransactionItem/Child24), and each Transaction can have one or more TransactionItems. There's a field on the...
  13. S

    Dealing with 'if null' syntax when locking old records (VBA)

    Hey there! If i comment out the line, it works without having to refresh. I could post the code for the UpdateParent function if that helps. I'm going to try putting the UpdateParent call at the bottom of the Current sub as well, just before the end. Edit: even when i put it just before 'end...
  14. S

    Dealing with 'if null' syntax when locking old records (VBA)

    Hey, i went to install the new front end at the office, and for some reason, this doesn't seem to work anymore! The only thing i've changed is a line which calls a public function (Me.Child24.Form.UpdateParent) - can anyone see why this would not work? Edit: it works after i REFESH the form...
Top Bottom