Ive finally gotten more used to statement functionality, etc, with Access over the past few days, but I've come along the INSERT INTO statement. And again, I am assuming it depends on proper quotation for the code, but I just cannot find out which quotes to use if at all? Here is the sample code I am working with:
Code:
Private Sub cmdadditem_Click()
Dim newrec As String
If IsNull([site_add]) Or IsNull([itemquantity_add]) Or IsNull([itemname_add]) Then
Else
newrec = "INSERT INTO Master ([Item Name], [Item Quantity], Site) VALUES ('itemname_add', 'itemquantity_add', 'site_add');"
DoCmd.RunSQL newrec
End If
End Sub
Item Name is a short string
Item Quantity is a number/integer
Site is a number/integer
All help is appreciated! Thank you.