Search results

  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...
  15. S

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

    Hey RG - i believe the main date function you gave me was public anyway? Or do you mean make Current Event in the main form public? I've currently made the main form current event public, and am using: Me.Child24.Form.UpdateParent Which gives no error, but i just want to be sure that the...
  16. S

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

    Hey - but how do i call a function which is defined in a subform, from the main form? I already have a bit of code going on in the Current Event on the main form. I tried Me.Child24.UpdateParent but it didn't work! Thanks!
  17. S

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

    Think i sorted it! I converted the delete button (on the subform) from using a macro to VBA, then called UpdateParent after it's deleted. I can't get UpdateParent to be called on loading the form (which would 'fix' the records which got jumbled up last time) - i get an error saying 'You can't...
  18. S

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

    I'm back :D (sorry RG) But is there a way of refreshing this 'On delete' also? When i delete one of the records in the subform, it doesn't update the date with the latest one. Is there a simple 'OnDelete' where we can refresh the code so that it calculates again? It would be great if perhaps...
  19. S

    Lock all 'old' records

    Hi Dave! That's exactly what someone told me in the other thread - Thanks! Eddie
Back
Top Bottom