Search results

  1. D

    Solved Dlookup to prevent duplicate entries

    Ok it still isn't working. I am uploading a small DB where I am having the problem.
  2. D

    Solved Dlookup to prevent duplicate entries

    Actuall I do not have the "amp" anywhere in the code. I saw after the last time when you reposted and ensured it isn't in there.
  3. D

    Solved Dlookup to prevent duplicate entries

    When I get back home to my computer I will adjust and see if it helps with the errors I am receiving.
  4. D

    Solved Dlookup to prevent duplicate entries

    1. No, from the information that has to be provided it is a lot of information and it is date specific, we do not have customers or anything else we can target on, just the date. 2 I am using the controls BeforeUpdate. I am using this code here Private Sub txtDate_BeforeUpdate(Cancel As...
  5. D

    Solved Dlookup to prevent duplicate entries

    Ok, so I have that the field on the table for the D_Date is required. However when a duplicate date is entered it has the msgbox as I wanted stating "That date already exists". Then right after clicking OK another system message pops up because the date is required and it is trying to undo the...
  6. D

    Solved Dlookup to prevent duplicate entries

    Ok, so I was going to post a DB on here and I was taking away things that were not needed for this problem I am currently having, then I figured out the problem I was having. Some of the code for something else I was using was preventing the code you provided from working properly. So I am...
  7. D

    Solved Dlookup to prevent duplicate entries

    Well on my form and what is stored on the table are both medium dates. dd/mm/yyyy. I do not use Now() to populate the field, the user has to input it manually. Once I am at my computer i will look at the information you provided Pat.
  8. D

    Solved Dlookup to prevent duplicate entries

    So, I turned the indexed to no . Reran the code and duplicates are appearing now and still no msgbox.
  9. D

    Solved Dlookup to prevent duplicate entries

    Right now no because I have it indexed not to accept duplicates. Does that need to change?
  10. D

    Solved Dlookup to prevent duplicate entries

    The control source is the D_Date for the query associated with table. Ok, lets take Dec 9, 2024. I already have that date input on the form, stored in the table. Then I go back to the form and reinput Dec 9, 2024. I then click on a button that takes me to a different form, no error, no...
  11. D

    Solved Dlookup to prevent duplicate entries

    I appreciate the encouragement. I do not understand the cancel part or what the "*" is doing, I do understand the idea behind the rest of it. I also tried both of those that you posted and here are my results...the Form_BeforeUpdate works, but when the msgbox pops up it is after the form has...
  12. D

    Solved Dlookup to prevent duplicate entries

    Well I have tried to input this code. It highlights the Cancel = Dcount line in red, and I am still getting the same results. I know the idea of this is beyond what I can do. I just thought it would be something decent to prevent duplicate enties.
  13. D

    Solved Dlookup to prevent duplicate entries

    I will look around, thank you again.
  14. D

    Solved Dlookup to prevent duplicate entries

    Ok, I am still lost on this. I will have to wait for your example, I did try to move the code to the different areas you said to test out, one then the other. But started giving me errors.
  15. D

    Solved Dlookup to prevent duplicate entries

    Ok, sorry for the delayed response. I tried the code you had provided, which btw thank you for the help and the explanation. However, what is happening is I am putting the code on the afterupdate for the txtDate box on the form. SO what is happening is when I purposefully enter a date that...
  16. D

    Solved Dlookup to prevent duplicate entries

    Thank you for the information, but I am still confused on something, this part: "\#yyyy\-mm\-dd hh:nn:ss\#")) > 0 is this just formatting it or is the criteria fr something, and what does the 0 do?
  17. D

    Solved Dlookup to prevent duplicate entries

    Hi, I have been reading up on what I can, but Dlookup confuses me, but then again what doesn't. I have a table called tbl_Coversheet and on that table I have a field called D_Date with the indexed set to Yes (No Duplicates), then on the form there is a field called txtdate for thie field on the...
  18. D

    Solved Looping on a form for several textboxes to be enabled

    Nevermind, I just figured it out. I simply have to add a line of code that turns enabled false.
  19. D

    Solved Looping on a form for several textboxes to be enabled

    Okay I finally got this working sort of using this code Dim i As Integer If Me.NumTrucks = 0 Then GoTo Zero If Me.NumTrucks = 1 Then GoTo One If Me.NumTrucks = 2 Then GoTo Two Zero: For i = 1 To 17 Me("A" & i).Enabled = True Next GoTo Done One: For i = 1 To 17...
  20. D

    Solved Looping on a form for several textboxes to be enabled

    Ok I have a form where I need to run a loop. The problem is I can get the first set of textboxes to enable on the loop, I just do not know how to get the 2nd set of boxes to be enabled. So here is the code I am trying to play around with but I am not sure if it has to be a 2nd if loop or if it...
Back
Top Bottom