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. General Programming
  3. Visual Basic
  4. How to change the "Validation Rule" property of a filed in a table using VBScript

How to change the "Validation Rule" property of a filed in a table using VBScript

Scheduled Pinned Locked Moved Visual Basic
helpdatabasesecuritytoolstutorial
1 Posts 1 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.
  • A Offline
    A Offline
    ADIDADPU
    wrote on last edited by
    #1

    Hi, I want to change the "Validation Rule" property of a filed in an access table using VB Script. Current value is "=1". I want to change it to either NULL or ">=0". Please help me...! THe following code giving me an error...! ' Establish connection strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Persist Security Info=False;" & "Data Source=" & strDest Set objConnection = CreateObject("ADODB.Connection") objConnection.Open strConnString ' Create a catalog for the database. Set cat = CreateObject("ADOX.Catalog") Set cat.ActiveConnection = objConnection ' Get the table. Set tbl = cat.Tables("App") ' Get the column. Set col = tbl.Columns("ID") ' HERE I AM GETTING AN ERROR saying "Item canot be found in the collection corresponding to the requested name or ordinal" ' Set the Description property. col.Properties("Validation Rule").Value = ">=0" Thank you, Regards, ADIDADPU

    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