Search results

  1. A

    Check for Duplicates in Unbound Text Boxes

    Any suggestions on the best way to check for duplicates in unbound text boxes on a form? I have 10 text boxes that I want to check. Currently I have a code in the After Update even of each but I am getting 50/50 results. I have this code in each of the 10 text boxes w/ each different for that...
  2. A

    Increment a Text Box on a Form

    Thanks. I am taking out the check for null and adding the NZ function. Will this default to 0 if null and then add 1? I am keeping the check for duplicates though, because the user fills out about 8 different forms that all connect through this RepairID and it is a primary key so if there is a...
  3. A

    Increment a Text Box on a Form

    Thanks for the response. I added this to my code, any possible problems Here?: Private Sub btn_new_repair_Click() Me.txt_new_repair = DMax("RepairID", "TBL_REPAIRS") + 1 If IsNull(Me.txt_new_repair) Or Me.txt_new_repair = "" Then MsgBox "Please Enter a Repair ID" Me.txt_new_repair.SetFocus...
  4. A

    Increment a Text Box on a Form

    I need to create an auto number on a text box in a form. I created it for the user to enter their own repair ID but now they want an auto number and it is the primary key. I would prefer it to build an increment of 1 on the last record in the table. I have my current code updating 2 tables...
  5. A

    If 1 Text Box = Multiple Text Boxes Then

    Ok, thanks I will try that and report back. I'm guessing the Me at the top means you don't have to apply it to each text box?
  6. A

    Back Color Problem

    Thanks for the reply. Yes it has. This runs right before it: Me.txt_incoming1 = DLookup("incoming_disposition", "tbl_module_repairs", "prikey = " & Me.txt_rid1 & "") Me.Refresh I should clarify that the code is in the afterupdate event of another text box (txt_rid1) but I have tried the code in...
  7. A

    Back Color Problem

    When I put my code into the afterupdate event of my text box it does not run. If I put it into the onclick event of a button it will run. Is the a parameter specific to the back color? Here is my code: If Me.txt_incoming1 = "Completed" Then Me.txt_incoming1.BackColor = vbGreen Me.Refresh End If...
  8. A

    If 1 Text Box = Multiple Text Boxes Then

    Yes, and I went with that but I though there was a separator so they could be listed as "any of these". I think it just because I remembered having a problem with the Or's before. Thank you.
  9. A

    If 1 Text Box = Multiple Text Boxes Then

    I am having trouble figuring out how to separate the the other text boxes. I tried a semi-colon and the commas. Any suggestions? If Me.txt_rid1 = ([Me.txt_rid2] , [Me.txt_rid3] , [Me.txt_rid4] , [Me.txt_rid5] , [Me.txt_rid6] , [Me.txt_rid7] , [Me.txt_rid8] , [Me.txt_rid9] , [Me.txt_rid10]) Then
  10. A

    Error 3075, Please Help!

    Thank you. Works great now! My Final Code: Private Sub txt_rid1_AfterUpdate() 'Field Line 1 If IsNull(Me.txt_rid1) Or Me.txt_rid1 = "" Then Me.txt_sn1 = "" Me.txt_incoming1 = "" Else If DCount("prikey", "tbl_module_repairs", "[prikey] = " & Me![txt_rid1]) = 0 Then Me.txt_rid1 = "" Me.txt_sn1 =...
  11. A

    Error 3075, Please Help!

    I keep getting an error '3075' syntax error(missing operator) in query expression 'prikey =' . My code runs fine when I first enter in the number but when I take the number out the After Update code runs again and produces this error. I have 3 unbound textboxes: txt_rid1, txt_sn1, and...
  12. A

    Output To Label Maker

    I have a Brother Pro XL label maker and I am trying to create a way to output to that printer to make labels. The software is P-Touch 5.0 and it allows for integration with Microsoft Word. Does anyone know of a way to output either straight to the label maker or to the label maker through Word...
  13. A

    Query Between Dates but with Count Grouped by Model Number

    OK, I think I got it. SELECT TBL_REPAIRS.APU_Model_Number, Count(TBL_REPAIRS.APU_Model_Number) AS CountOfAPU_Model_Number FROM TBL_REPAIRS WHERE (((TBL_REPAIRS.CompletionDate) Between [Enter Start Date] And [Enter End Date])) GROUP BY TBL_REPAIRS.APU_Model_Number; Seems to be working fine...
  14. A

    Query Between Dates but with Count Grouped by Model Number

    SELECT TBL_REPAIRS.APU_Model_Number, Count(TBL_REPAIRS.APU_Model_Number) AS CountOfAPU_Model_Number, TBL_REPAIRS.CompletionDate FROM TBL_REPAIRS GROUP BY TBL_REPAIRS.APU_Model_Number, TBL_REPAIRS.CompletionDate HAVING (((TBL_REPAIRS.CompletionDate) Between [Enter Start Date] And [Enter End...
  15. A

    Query Between Dates but with Count Grouped by Model Number

    Thanks for the response. That didn't work for me though. Let me give more info to help clarify what I am trying to do. I have a completion date field that I want to show query data between 2 dates. the criteria is: Between [Enter Start Date] And [Enter End Date] I have a Model Number field that...
  16. A

    Query Between Dates but with Count Grouped by Model Number

    I currently have a query of between dates which the user enters, but when I try to get a total count of model numbers it gives totals for each date. I am trying to get a count of model numbers between these dates with the dates excluded in the grouping. Any help would but great!
  17. A

    Duplicate Loop

    Ok, so I found the fix. Here is the final code I have and it works great: It requires a date field to not be null and will not let you enter more than 99 duplicates bringing the total to no more than 100 records. Thanks to Macropheliac and Boblarson!!!
  18. A

    Duplicate Loop

    Thanks that worked. It only didn't work if the date field was null which is weird because it is not a required field. So I put this code in to prevent the run time error from occurring: If IsNull(Me.PickUp_Date) Or Me.PickUp_Date = "" Then MsgBox "Please Enter a Pickup Date to Continue"...
  19. A

    Duplicate Loop

    Thanks for the responses. Bob's method is the direction I took and it worked like a charm except for if any of the fields are null I get an error, run time 3464 for ( CurrentDb.Execute strSQL, dbFailOnError). Is there a setting or code to fix this because sometimes there is a null field or two...
  20. A

    Duplicate Loop

    Thanks for the response. So drop the outer loop?
Back
Top Bottom