• Preventing Duplicate Entries in Continuous subform

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Preventing Duplicate Entries in Continuous subform

    Author
    Topic
    #503494

    Hi everyone,

    i have a main form named BillDataMov_F these form containing subform named itemMov_FT it’s a continuous form, what i want is when the user enter items in the continuous subform the items not duplicated, what i mean that if the user enter item which is entered before the code check the previous txtbox in the same form if the user entered item msgbox appear “the item is entered before”.
    i use these code but the code is wrong becuse the msgbox is appear whenever i enter a value greater than 0

    If DCount(“item_no_IM”, “BillDataMov”, “item_no_IM = ” & item_no_IM) >0 Then
    MsgBox “the item is entered in the above txtbox”
    Cancel = True
    End If

    please help

    Regards

    Viewing 2 reply threads
    Author
    Replies
    • #1541043

      Hi simsima,
      Welcome to the forum.

      Just to be sure the problem is clear, could you confirm which of the following scenarios (each starting from a “clean slate”) trigger the msgbox.

      A. item_no_IM 0 followed by item_no_IM 0
      B. item_no_IM 0 followed by item_no_IM 1
      C. item_no_IM 1 followed by item_no_IM 0
      D. item_no_IM 1 followed by item_no_IM 1

      Dave

    • #1541093

      Hi sir,

      thank you for your help i solve it:o

    • #1541206

      That’s great. Would you like to share your solution here, in case someone else encounters the problem and looks in this thread for help.

    Viewing 2 reply threads
    Reply To: Reply #1541206 in Preventing Duplicate Entries in Continuous subform

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel