1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development Validating data in Visual Basic with Access?

Discussion in 'Software' started by Cybertronic, 31 Jan 2005.

  1. Cybertronic

    Cybertronic What's a Dremel?

    Joined:
    25 Feb 2004
    Posts:
    354
    Likes Received:
    0
    I need some help on my A level Computing project as my teacher seems to be poor at teaching the subject :(, could anyone please point me in the right direction or even provide links to how programme validations for VB with text boxes when linking with a Microsoft Access database? :)

    I've asked my teacher about this, all she said is that there's validations already in the Access database, but I want my project data validation to be more specific such as when entering a wrong data type, it would come up with a message box stating that the data type or field length etc is wrong :)

    Please help :)

    Sorry for such a newbie topic, please do help :)
     
  2. laoda

    laoda What's a Dremel?

    Joined:
    27 Nov 2004
    Posts:
    35
    Likes Received:
    0
    Try using IsNumeric(someStringVariableOrProperty) in an If statement.

    Returns true if it is, false if it isn't numeric.

    Is that what you're looking for, or do you need something more specific?
     
  3. planki

    planki ...

    Joined:
    20 Dec 2003
    Posts:
    1,132
    Likes Received:
    0
    im pretty sure in access you can stack up multiple validation rules next to each ie:

    Is Not Null; >50 < 100 etc
    And then you do the same with the error messages ie:

    You Must Enter A Name; Your Number must be between 50 and 100

    You could always use the expression builder to make your validation rules anyway just click on the button with three dots on (...) which appears when you clikc on the validation rule box in the design view for your table.
     
  4. Hepath

    Hepath Minimodder

    Joined:
    20 Oct 2003
    Posts:
    730
    Likes Received:
    0
    In addition

    I'm sure you used to be able to add custom validation modules through the internal VBA stuff.... *ouch!* my head hurts trying to remember!

    Is Access still actually used :blush: :naughty:
     

Share This Page