Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. newbyvba

    Why won't my validation run?

    I've replace the If ctl.value = null with the isnull(ctl.value) and brilliant, it works - thank you. HOwever, after the message box displays, immediately afterwards displays an error: Runtime error 3021 No current record. Is there a way to stop this happending please? Thanks you for all your help
  2. newbyvba

    Why won't my validation run?

    I've just tried an L instead but it still didn't do anything :-( its so frustrating!
  3. newbyvba

    Why won't my validation run?

    I've put a * in the fields that I want filled in. I've put this code and nothing validates... any ideas? its like there's no validation on there at all!! Private Sub Form_BeforeUpdate(Cancel As Integer) ' check field for * in tag and check if text entered and provide error Dim Msg As String...
  4. newbyvba

    Found this on here but getting compile error??

    Hello MazeWorX I've added the line Cancel = true before the ctl.getfocus line However, nothing is happening when no data is entered for the tagged fields. Any idea why? Thanks so much - this is very frustrating!
  5. newbyvba

    Found this on here but getting compile error??

    I've incorporated the code MaZeWorX suggested but on entering the data, i'm not getting any validation happening at all! Have I missed something.. incase anyone has nothing better to do, i've pasted the code against the form should there be any glaring reason its not working.. or perhaps its...
  6. newbyvba

    Is there a better way of doing an IF (with multiple ors)??

    Ah, I see I need a Case else if others not met! The case isn't quite working for the 9, 10. I do get the message box but I also want to make the term visible. I tried the following but it didn't like it! You can't have 2 results for the condition set then? Private Sub...
  7. newbyvba

    Is there a better way of doing an IF (with multiple ors)??

    Wow! that simple... thank you, you make it look so easy. I wish the book I was reading had! May I ask what the Case Else .... means
  8. newbyvba

    Is there a better way of doing an IF (with multiple ors)??

    I’m popping a bit of code behind a combo box called comboobjective on a form. If the user chooses certain objectives numbers, I want one text box to become visible, but if they pick any one of another list of values, then the other text becomes visible. The IF does it (as I’ve put below) but...
  9. newbyvba

    Found this on here but getting compile error??

    Oh thanks. Yes I see - I've put another End If in there but now I get the msgbox pop up but when I click ok I'm now getting the following: Microsoft Visual Basic; runtime error '3021' No current record... any ideas please?
  10. newbyvba

    Found this on here but getting compile error??

    Sorry: this is the exact sub I have: Private Sub Form_BeforeUpdate(Cancel As Integer) ' check field for * in tag and check if text entered and provide error Dim Msg As String, Style As Integer, Title As String Dim DL As String, ctl As Control DL = vbNewLine & vbNewLine For Each...
  11. newbyvba

    Found this on here but getting compile error??

    I wanted some code to verify users had entered info in some fields on a form. This code looks perfect but i'm getting an error saying: compile error: next without For... whats wrong please? Dim Msg As String, Style As Integer, Title As String Dim DL As String, ctl As Control DL =...

Part and Inventory Search

Back
Top