1 Replies - 2477 Views - Last Post: 23 September 2012 - 11:15 AM Rate Topic: -----

#1 sogeking  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 23-September 12

data type mismatch in the criteria expression

Posted 23 September 2012 - 09:16 AM

Private Sub cmdadd_Click()
DataEnvironment1.Add Text1.Text, Text2.Text, Text3.Text, Text4.Text, Text5.Text, Text6.Text
MsgBox "sucessfully saved"
End Sub
Is This A Good Question/Topic? 0
  • +

Replies To: data type mismatch in the criteria expression

#2 Martyr2  Icon User is online

  • Programming Theoretician
  • member icon

Reputation: 4334
  • View blog
  • Posts: 12,130
  • Joined: 18-April 07

Re: data type mismatch in the criteria expression

Posted 23 September 2012 - 11:15 AM

If you are trying to save textbox data to a database, you don't directly try to add it to the dataenvironment object. The dataenvironment holds other objects like the connection object which you can then use to save data with.

Look into using the ADO connection and recordset objects. Read a bit about them here and then check out the method AddNew example for a full example of how all this works.

In the future please provide a little more story as to what you are trying to accomplish. Just posting a few lines of code isn't going to get you anywhere on most boards. Luckily I try to take the time to answer things like this from time to time.

Good luck to you. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1