Results 1 to 6 of 6

Thread: Inserting into Access Yes/No Field [Resolved]

Hybrid View

  1. #1

    Thread Starter
    Member rabaile's Avatar
    Join Date
    May 2005
    Location
    Fayetteville, Arkansas
    Posts
    56

    Re: Inserting into Access Yes/No Field

    Dim projectInsertFormat As String = "INSERT INTO project (CCN, ProjectName, Active, ActiveDate) " & _
    "VALUES('{0}', '{1}', 'True', '{2}')"
    Dim projectInsert As String
    projectInsert = String.Format(projectInsertFormat, _
    txtccn.Text, _
    txtproject.Text, _
    datehold)

    This would be the same as your statement, just in my format. Still get datatype mismatch. Ideas?

  2. #2
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: Inserting into Access Yes/No Field

    you need to change the txtproject.Text to CType(txtProject.Text, Boolean) for it to be passed as a boolean value, not a string.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

Posting Permissions

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



Click Here to Expand Forum to Full Width