here's my code

Dim sql As String = "INSERT INTO tbldailysales(date, totalprice)VALUES(@date, @totalprice)"
        cmd = New OleDbCommand(sql.ToString, con)
        cmd.Parameters.AddWithValue("@date", lblday.Text)
        cmd.Parameters.AddWithValue("@totalprice", lblstotal.Text)
        cmd.ExecuteNonQuery()

The only thing I can see is that you're missing the final semi-colon (;) on the statement.
If it isn't that, can you provide the actual error message?

Agreed with Reverend Jim. Use Question Mark i.e. ? as a placeholder of a Parameter.
Your SQL Statement shoud be

Dim sql As String = "INSERT INTO tbldailysales(date, totalprice) VALUES(?, ?)"

But, what was the error report. Is your connection Object Opened. I did not find it in your code.

my connection is open. but i can add now, thanks for helping guys :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.