Search results

  1. M

    Form Visible True/False Set Focus issue results in 2018 error

    When I have two tabs everything works fine when hiding and unhiding. However when I add a third tab which visible property varies it was causing and issue losing focus so to get around that i stuck the third tab data inside each of the original two tabs. Since I am new to this any advice is...
  2. M

    Form Visible True/False Set Focus issue results in 2018 error

    I have three tabs which the visible setting is driven off of three other fields one field drives each tab. I was running into an issue while going through each record where it could not hide a field that had current focus. I noticed this happens when i try to click through records rather...
  3. M

    Form Module Visible Yes/No Question

    slowly getting it. Makes me wonder if there is a reference to be used that is a variable where Forms!WindOptOut!Text261 could be referenced as Forms!ActiveForm!Text261 thank you for all of your help and input thus far..
  4. M

    Form Module Visible Yes/No Question

    I think I caught your drift. Let me know if right or wrong. I chose this method as only one form will be utlized however there will be a lot of silly validations as to choices made by the input in terms of what is visible and what is not visible/available. I changed the modules to a similiar...
  5. M

    Form Module Visible Yes/No Question

    I thought I might have had issues do to multiple functions in one module so I split them out. I have attached a zip file of the db.. the vba works fine when done manually on the form and in the before/after events however once in a module and referenced on the form there is no worky? Since I...
  6. M

    Form Module Visible Yes/No Question

    I am trying to learn modules and while some of them tend to work others dont. I assumed you could per say nest different functions within a module without issue but advice and input is suggested as to any help to be provided. Option Compare Database Private Sub Form_Current() Call...
  7. M

    vba on focus/lost focus help

    the only reason I went with the forms reference is do to an issue when someone was selecting a record in the split form none of the vba visible items would work. When i did a direct reference to these, after finding the fix on here, things started to work. I have always read about...
  8. M

    vba on focus/lost focus help

    here you go, as the revision doesnt work. Can I ask your opinion on .visible items. I have several items setup to change the view however I originally tried on the before events but issues popped up while scrolling through records. My final decision was to do before after and on the form...
  9. M

    vba on focus/lost focus help

    maybe this doesnt accept and statements or maybe I am doing this wrong If Forms!WindOptOutV12.IndStatmentHandwrittenComment = -1 And Nz(Forms!WindOptOutV12.IndStatmentHandwrittenComment, "") = 0 Then blnError = True strError = "Other Deviations Comment" & vbCrLf End If...
  10. M

    vba on focus/lost focus help

    I did the below and apologize for me not catching your wording as i figured it would work as a defined function.. this has no issues but does not catch the empty text box.. also when you use len it is to cont characters so why is there a & "" added? this will work by itself If...
  11. M

    vba on focus/lost focus help

    nevermind trying something rather quickly.. i thought the function would work
  12. M

    vba on focus/lost focus help

    Private Sub Other_BeforeUpdate(Cancel As Integer) OtherFunction Dim blnError As Boolean Dim strError As String If Forms!WindOptOutV12.Other = -1 And Len(Forms!WindOptOutV12.IndStatmentHandwrittenComment & "") = 0 Then blnError = True strError = "Other Deviations...
  13. M

    vba on focus/lost focus help

    I attached the file and I know its far from perfect. If blnError Then Cancel = True If MsgBox("You need to fill out these fields before we can save the record: " & vbCrLf & _ strError & vbCrLf & _ "Do you wish to cancel this record?"...
  14. M

    vba on focus/lost focus help

    i set this up as a test but it does not catch the field on going to the next record.. the only thing i can think of is should it be altered to be nz(fieldname)? it is called in the Private Sub Form_BeforeUpdate(Cancel As Integer) Validation End Sub Public Function Validation() Dim...
  15. M

    vba on focus/lost focus help

    deleted this as I am not making sense.
  16. M

    vba on focus/lost focus help

    The Reason I was testing for false was to implement another message box that would input "complete" into a field and essentially lock everything.
  17. M

    vba on focus/lost focus help

    so this If blnError = False Then If MsgBox("You need to fill out these controls before we can save the record: " & vbCrLf & _ strError & vbCrLf & _ "Do you wish to cancel this record?", vbQuestion + vbYesNo, "Validation Failure") = vbYes Then...
  18. M

    vba on focus/lost focus help

    In essence none of these are new records as they will have user information and a number attached to them. Extra information will just be attached to them. I wasnt sure how newrecord would work in this situation.
  19. M

    vba on focus/lost focus help

    My goal for this is once a user clicks a button that says complete all records including the complete button would be locked at that point and only changed by someone going into the table and manually changing the record field to not complete. I would have to setup your before update...
  20. M

    vba on focus/lost focus help

    Thanks, I never really fully understood the after/before update when i first started this with the if.visible statements I was using so they were all set to after/before/on form and they worked. I appreciate the catch as I have been on this for a while and am most likely not seeing straight...
Top Bottom