N
nash0503
hi
i try to insert data , which i get from a combobox ,in a access table.
i tried that in two different way.
first is:
Private Sub Combo21_Change()
Dim day As String
day = Me.Combo21.Value
DoCmd.RunSQL "INSERT INTO Date_Table (Day) VALUES (day)"
MsgBox (day)
End Sub
it prompt me to input the data for variable 'day',but i already assign the
value 'Me.Combo21.Value' to it.
And the second one is:
Private Sub Combo31_Change()
Dim db As DAO.Database, sSQL As String
Set db = CurrentDb
day = Me.Combo21.Value
MsgBox (mon)
sSQL = "INSERT INTO Date_Table (Day) VALUES (day )"
db.Execute sSQL
MsgBox (day )
End Sub
this code give me:
Run-time error '3061'
too few parameters.expected 1.
please help me.
i try to insert data , which i get from a combobox ,in a access table.
i tried that in two different way.
first is:
Private Sub Combo21_Change()
Dim day As String
day = Me.Combo21.Value
DoCmd.RunSQL "INSERT INTO Date_Table (Day) VALUES (day)"
MsgBox (day)
End Sub
it prompt me to input the data for variable 'day',but i already assign the
value 'Me.Combo21.Value' to it.
And the second one is:
Private Sub Combo31_Change()
Dim db As DAO.Database, sSQL As String
Set db = CurrentDb
day = Me.Combo21.Value
MsgBox (mon)
sSQL = "INSERT INTO Date_Table (Day) VALUES (day )"
db.Execute sSQL
MsgBox (day )
End Sub
this code give me:
Run-time error '3061'
too few parameters.expected 1.
please help me.