Комментарии:
Place 1
Ответитьi'm new to visual basic (I don't know anything about it... where do i start as a newbie)?
Ответитьhello there, i am trying to find out the error on sql please. when i run it shows yellow colour error on full sql statement . can you please let me why it is? i m waiting for your reply.thanks
Private Sub archive_Click()
Dim srnovar As Integer
srnovar = Me.srno.Value
If IsNull(Me.pdate) Or IsNull(Me.itemid) Then
Me.archive.Value = 0
MsgBox " purchase date and item name is missing"
Else
DoCmd.RunSQL "INSERT INTO tbl_purchase_history(srno,pdate,itemid,qty,archive,archivedate)" & _
"SELECT tbl_purchase.srno,tbl_purchase.pdate,tbl_purchase.itemid,tbl_purchase.qty,tbl_purchase.archive,Date() AS expr1 " & _
"FROM tbl_purchase WHERE tbl_purchase.srno=" & srnovar
End If
End Sub