Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006

    Question Unanswered: Adding blank Value.....

    Hi All,

    I want to add a blank value from my visual basic application to a ms access database...

    I have a ms access table which as field of type currency. Now when i add a data but the textbox contains blank when i try to add it gives a error of type conversion. so converted the textbox data by val function. the record was added but 0 was added to the database.. I want the field should be 0. Can anyone help


  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    Why don't you post the VB code you use to insert the data into your database.
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

  3. #3
    Join Date
    Sep 2006
    try it
    if Val(txtRs,text) <> 0 then
    ' insert into database
    End if

    and in database remove default value of currency type

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts