var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
i have got a table with an autonumber as the key.
when the form is loaded it creates a new record in the table, displays the id in a text box and closes the connection.
when the cancel button is pressed i want it to delete the record but using the following sql i get a data mismath error.
Dim strsql As String
strsql = "SELECT * FROM projectHeader " & _
"WHERE projectID = '" & txtCNPProjectID.Value & " ' "
how can i convert the txtCNPProjectID.Value wich is showing an intger value into an integer?
your & _ may not be having the effect you anticipate. try:
note the trailing ; as well.
strsql = "SELECT * FROM projectHeader "
strsql = strsql & "WHERE projectID = '" & txtCNPProjectID.Value & "';"
the & _ works fine i have checked this, what does the ; do?
the problem is that txtCNPProjectID.Value returns a text value. However the the value in there is actually a collection of digits ie 14445.
this i need to convert 14445 text to 14445 integer so i can use it in the sql as the projectID is an autonumber.
"WHERE projectID = " & txtCNPProjectID.Value & ";"
the "'" text "';" construction is to concatenate quoted text into your string.
thank you that works a fine.