Search results

  1. B

    Solved Filtering Forms Based on a Calculated Field

    In my database, I have a form titled frmEquipTrack that has a calculated field titled txtMainDueDate that is supposed to be the date that a piece of equipment is supposed to be serviced by. When I I am trying to filter the forms by the date in the txtMainDueDate field so that I only get records...
  2. B

    Filtering Forms Based on the condition of two check boxes

    I added a command button on the equipment tracking form that adds Manufacturers to the tblMfr table and while I was testing the code I was inadvertently adding blank data to the table. I thought that I had deleted all of the blank spots on the table when I was done testing the command button. I...
  3. B

    Filtering Forms Based on the condition of two check boxes

    I have attached a copy of my database. In the time between my pervious post and this post, I realized that I was overcomplicating the issue. And instead of filtering the forms based on the value of a check box, I changed to filter off the value of a combo box. Also considering redacted some of...
  4. B

    Filtering Forms Based on the condition of two check boxes

    This is a functionality issue that I am adding to a database that I have been revamping and fixing some issues, so I have to manually go through the data and figure out what equipment is still in use at our site, what equipment has been put into storage and what equipment has been disposed of...
  5. B

    Filtering Forms Based on the condition of two check boxes

    Thank you all for the help. I was able to figure out the problem. I was just overcomplicating it by looking at tutorials for creating a where condition using two different data types. Since both data type are boolean I was able to simplfiy my code to: Private Sub btnEquipmentTracking_Click()...
  6. B

    Filtering Forms Based on the condition of two check boxes

    Both fields are Boolean Data types. I have a lot of trouble writing AND statements in VBA.
  7. B

    Filtering Forms Based on the condition of two check boxes

    A Combination of I would hard code them, but I always have lot of problems getting my AND statements to work inside the DoCmd.OpenForm command. I can never seem to get the data types surrounded by the correct symbols.
  8. B

    Filtering Forms Based on the condition of two check boxes

    I am trying to filter forms based on the value of two check boxes. I have a check box called activeEquipment on a form that I am using to track if a piece of equipment is being actively used. The value of the box is True if the Piece of Equipment is being used and false when the equipment has...
  9. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    Okay, now I see what is going on with the code. Sorry for the delay in my response, the last couple of weeks at work have been busy. Thank you Pat for everything. With your help I was able to really mitigate the possibility of critical data accidentally being overwritten. I'll be marking...
  10. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    Thank you for the explanation, I think that I am following the code better. If IsNull(Me.cboDeptName.OldValue) Then Else If Me.cboDeptName = Me.cboDeptName.OldValue Then Else MsgBox "Dept Name may not be changed after record is...
  11. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    Thank you for the examples. They have been really helpful and I am getting a better handle on how to check for bad data. I would like to ask a couple of questions about your code to make sure that I am understanding what is going on First the line: If IsNull(Me.cboDeptName.OldValue) Then...
  12. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    Yes, I can see how my current code wouldn't stop bad data from being saved. I keep trying to think of how I would check for bad data and what situations where where bad data would most likely be entered into the form. I think on text boxes that require a description would be pretty easy. I would...
  13. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    Okay, I was able to watch the two videos that you recommended and I can see what you are saying about having the validation code in the the Before_Update Event and I am working on getting the validation code on my forms moved over to the Before_Update Event on the form. The question that I have...
  14. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    That is an issue that has been in the back of my mind. And I have added some validation checks in to my database, but the validation checks are mostly to make sure that a field in the record isn't left blank. I don't have the validation checks in the BeforeUpdate Event and after this...
  15. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    I am sorry, you did say previously that you use BeforeUpdate to validate the data. I am beginning to understand that using BeforeUpdate could/would be the best way to prevent bad data from being entered which would lessen my need to lock fields on the form. My desire to lock certain fields on...
  16. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    I must be missing something. I am trying to call this function from the form's before update event and I am able to make changes to the information in the fields that are supposed to be locked.
  17. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    I only have one form for entering/editing the information for the cables that are being recording into the database. I am using OpenArgs adapt the form for the purpose that I need. I have another form for keeping track of equipment maintenance. The only similarities between the two forms is that...
  18. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    It would be nice not to have to tag so many things on my forms, especially if I need to make changes to the forms in the future.
  19. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    The only problem with that method is that I have text boxes and combo boxes on the form that I am using for search functions.
  20. B

    Solved Creating Function To Lock Text Boxes and Combo Boxes When A Form Loads

    When you click on the button that reads Search/Edit Records and the form frmCableInfo open up the fields cboCategory, CableNumber, cboSource, srcDescription, DrawingNumber, cboDestination, and dstDescription are locked and not able to be edited. When you click on Add Cable the frmCableInfo is...
Back
Top Bottom