Search results

  1. M

    Comparing two tables, trying to source one table from online data source

    Hello, I have a macro to compare a set of tables. Previously this macro was used by someone else in my workcenter to compare two tables stored on a shared drive. My management team wants to source one of the tables from an online data source. Now, when I go into my macro and try to change the...
  2. M

    Need to require data entry before record submission

    Yes and before it allows the option to send the form in email.
  3. M

    Need to require data entry before record submission

    Also, is there a way to write exceptions? I have about 25 fields, only about 20 require data always.
  4. M

    Need to require data entry before record submission

    Gah there's a new problem. I can't seem to find any way to use code in a Before Update for the command box I use to submit the form. The Property Sheet for the command box contains no Before Update event...
  5. M

    Need to require data entry before record submission

    Lol, boss will love the msgbox ;) Yeah, that could do it. Thanks!
  6. M

    Need to require data entry before record submission

    Hah! Me too. Yeah, will renaming the fields effect the display in any way? I dont care if the program is messy, I do care how the end result looks.
  7. M

    Need to require data entry before record submission

    Well, the problem with that is I actually have about 20 different controls which are referenced, not just "Incident Date." I've shortened the code for testing purposes, but when you extract it back out to all 20, in the format your provided it exits out before moving on to the next one. I...
  8. M

    Need to require data entry before record submission

    I pulled out "exit sub" from the control line and added it to the final "if" statement. Now, it WILL post the message requested... but for some reason, it ONLY does it when I submit the form and hit "save" on the code page. Without hitting "save" on the code page, it doesn't pop up... that's...
  9. M

    Need to require data entry before record submission

    K I tried to combine the two and now I've lost functionality. Here's what I'm using: Private Sub Form_BeforeUpdate(Cancel As Integer) Dim strMissingInfo As String Dim strMsg As String If IsNull(Me![Incident Date]) Then strMissingInfo = strMissingInfo & "Incident Date" Exit Sub End If If...
  10. M

    Need to require data entry before record submission

    Right, thanks. I got your first code working, I'll play with this a bit. The initial value for strMissingInfo is in there, I just cut it out to keep the copy small. It's in the OP full code though. If I can't figure it out from here I'll reply here today or tomorrow.
  11. M

    Need to require data entry before record submission

    It looks like this section of code that I was using from the other person was intended to popup a message that indicates WHICH fields require data, hence the original Lens command in my code. strMissingInfo = strMissingInfo & "Incident Date" End If If Len(strMissingInfo) <> "" Then strMsg =...
  12. M

    Need to require data entry before record submission

    Alright, when I enter a value in another field and hit my command button "Submit," it does return a "0" per the Lens command, and pops up an erorr that I have to debug. But it does that AFTER it submits the email, which I'm guessing means I need to run code on the command button as you said...
  13. M

    Need to require data entry before record submission

    Okay in the spirit of taking things slowly: I haven't been "running" the code, I've been exiting the VBA editor and seeing if my form works as intended. Also, my MSAcess makes a distinction between "code" and "macros" which is why I asked in OP if I was supposed to be entering "code"...
  14. M

    Need to require data entry before record submission

    No sir, I've just attempted this several times, there is no data in the field at all. This is the source of my confusion, it appears that even when I'm running working code, it is not running correctly. *Edit: What DOES happen is, it submits my form, posts the email, and did not return any...
  15. M

    Need to require data entry before record submission

    I had to rewrite that to clear the red zones as follows: Private Sub Form_BeforeUpdate(Cancel As Integer) Dim strMissingInfo As String Dim strMsg As String MsgBox Len(Me.[Incident Date] & vbNullString) If Len(Me.[Incident Date] & vbNullString) = 0 Then Cancel = True strMissingInfo =...
  16. M

    Need to require data entry before record submission

    Yes, tried that first. I'm sorry -- I added the quotes as an attempt to resolve the issue and forgot to remove them.
  17. M

    Need to require data entry before record submission

    When I enter that line, Len(Me.[Incident Date] & vbNullString) = "0" It returns, highlighting "Len" with "Compile error: Expected: Identifier" *Edit: Nevermind I forgot the If / Then quantities. Still, when it runs it doesnt stop the submission with a null field. Private Sub...
  18. M

    Need to require data entry before record submission

    Ah I just realized I should probably mention - I have a command button that emails the form out, and that it is when that is pressed that I would like to send the check to make sure the fields contain data. I'm not sure if this matters, but considering the idiosyncrasies of coding... I guess it...
  19. M

    Need to require data entry before record submission

    Right, I mispoke. Have it under Form... terminology is still not 100% for me. Here's my code: Private Sub Form_BeforeUpdate(Cancel As Integer) Dim strMissingInfo As String Dim strMsg As String If IsNull(Me.[Incident Date]) Then Cancel = True strMissingInfo = strMissingInfo & "Incident...
  20. M

    Need to require data entry before record submission

    Hello, I did not want to hijack a thread but I have a similar issue as that posted here: ww.access-programmers.co.uk/forums/showthread.php?t=207813 (You'll have to add the h t t p : / / w, it won't let me post a real link since I'm a new user :eek:) My boss wants me to be able to mandate...
Back
Top Bottom