Search results

  1. H

    How to make a field mandatory

    I've had many years of cats. They taught me everything I know.
  2. H

    How to make a field mandatory

    Micron, First I didn't know about code tags, and I was wondering why I couldn't get the indentations to stay. Now I do. Thanks. Then, I pasted in the pieces of code in red and tested it. It works just the way I need it to. I couldn't be more pleased. Finally, thank you to everyone who...
  3. H

    How to make a field mandatory

    Pat Hartman’s code (thank you Pat) looks a great deal like code I already tried: Private Sub Form_BeforeUpdate(Cancel As Integer) If IsNull(Me.txtSampleNo) Then MsgBox "Please enter a sample number " Me.txtSampleNo.SetFocus Cancel = True End If If IsNull(Me.cboECS) Then MsgBox...
  4. H

    How to make a field mandatory

    Micron, Thanks very much for all your help. I know I have code for controls that I've removed. I intended to clean up the superfluous code as a final step before making the application available to users. I wanted to have the navigation buttons because I was afraid that users wouldn't see the...
  5. H

    How to make a field mandatory

    I have buttons for Exit, Previous Record, Next Record and Save. Does the code go around the code for each of these buttons? The code contains the line, "DoCmd.RunCommand acCmdSaveRecord." Does that invoke the Save button code? If so, I'm still unclear on where "If frmValidateData Then,"...
  6. H

    How to make a field mandatory

    Gasman, Thank you for the link. I see where the code goes, but should the field be required in the table or the form?
  7. H

    How to make a field mandatory

    Gina, Thanks for the link. At first I thought that I couldn't make Micron's code work, but I realized that I had to modify a record for it to kick in. I see how your code would do the same kind of thing: scroll through all of the controls, and for the ones with required, or reqd in the Tag...
  8. H

    How to make a field mandatory

    I see the principle that it's safest to enforce data integrity at the table level. In this case, the application is only for data entry. We won't be importing data or running update or append queries--we download the data into an application we created in Excel for analysis, which also has data...
  9. H

    How to make a field mandatory

    Pat, I'm unclear about how making the fields required in the table or populating them would help. That's where this thread started. I made fields required in the table, but the messages aren't helpful to users. I changed the required property back in the table and pursued making the fields...
  10. H

    How to make a field mandatory

    Hi Micron, I’m anxious to see the changes. We put the save buttons in to reassure the users that their work was being saved. I can live without the Save buttons, but what would suggest putting in their place. I’m surprised about the compile errors. It isn’t something I’ve experienced on...
  11. H

    How to make a field mandatory

    Thank you very much. I'm attaching the db. I'll be for a week away starting tomorrow. I'll check in again next Wednesday, 7/24.
  12. H

    How to make a field mandatory

    I copied in the code as a before update event on the form, and I put in reqd,Please enter a sample number in the tag property of txtSampleNo and reqd,Did this case originate with ECS? in the tag property of cboECS. I tested the form with the same records with missing data I used the last time...
  13. H

    How to make a field mandatory

    I tried Micron’s code, but I’m stuck on the Tag property. Do I enter it in the property sheet for each control I need to be filled in? I’ve never used the Tag property before, so I looked it up, and all the examples I found showed setting it with code. However, none showed where the code goes...
  14. H

    How to make a field mandatory

    The simplest way to avoid that is to use the field's validation property. As long as there is a validation rule that doesn't include a space as a valid entry, the field won't accept a space.
  15. H

    How to make a field mandatory

    Thank you both, Micron and Colin, I'm at home now, and I don't have access to the db. I will try the code on Monday and also check out the link. I'll report back Monday or Tuesday. Henry
  16. H

    How to make a field mandatory

    Thank you. Yes, I would like the code.
  17. H

    How to make a field mandatory

    Yes. I wanted more than the label caption because I want to be as clear as possible for the users. In the code I first posted, the intention was, if there was a null value in any of the required text/combo boxes you would get a message and you wouldn't be able to save. I also wanted to set the...
  18. H

    How to make a field mandatory

    Thanks Micron, Yes, it seems as though this would come up a lot. I'll definitely take you up on your offer to write the procedure, although, and I know this is an extra step, if you could explain the logic, I could learn for next time. These are the controls and the messages that go with...
  19. H

    How to make a field mandatory

    Hi Uncle Gizmo, I'm at work, and our IT department has created all sorts of complications for downloading Access files. I'll this from home. Thanks, Henry
  20. H

    How to make a field mandatory

    Thanks Ranman256, Are you saying that I should substitute this code for the code I tried. I can see that it will give a message, but it won't stop the user from saving the record, will it? Also, which event is the code attached to? It isn't before update. Perhaps I don't understand (private)...
Top Bottom