Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Ms Access

Ms Access

Scheduled Pinned Locked Moved Database
csharpdatabasehelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hitesh kalra
    wrote on last edited by
    #1

    I am creating a phonebook in c# .net my database is Ms access. There are no duplicates allowed in two columns mobile no and landline no but if I left blank those columns two times it gives an error that "no duplicates are allowed". Please give me such code to allow null but not duplicates are allowed because this is not compulsory every person has mobile or landline. thanx in advance.

    L 1 Reply Last reply
    0
    • H hitesh kalra

      I am creating a phonebook in c# .net my database is Ms access. There are no duplicates allowed in two columns mobile no and landline no but if I left blank those columns two times it gives an error that "no duplicates are allowed". Please give me such code to allow null but not duplicates are allowed because this is not compulsory every person has mobile or landline. thanx in advance.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Open the table in MS Access in the design-view, and set Index to "Yes (No Duplicates)". Set Required to "No" and Allow zero length to "Yes". That should do the trick :)

      I are troll :)

      H 1 Reply Last reply
      0
      • L Lost User

        Open the table in MS Access in the design-view, and set Index to "Yes (No Duplicates)". Set Required to "No" and Allow zero length to "Yes". That should do the trick :)

        I are troll :)

        H Offline
        H Offline
        hitesh kalra
        wrote on last edited by
        #3

        It is not working because Unique required only one null value. So I run the form first time it takes one blank column but when next time I run the form it given an error of the duplicate records.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups