Hi
I've a table and a form. The table is named Cars and it has a field N_Car, which is where a ID number is stored (made of 5 digits, 12345).
cCar is a combo box with the car IDs listed.
I have this in a button on the form:
It gets me an Overflow error. If I do "Dim c" (without "As Integer" it asks me for a parameter, when I've already input it with the input box.
Please help me :\
I've a table and a form. The table is named Cars and it has a field N_Car, which is where a ID number is stored (made of 5 digits, 12345).
cCar is a combo box with the car IDs listed.
I have this in a button on the form:
Code:
Private Sub cmdApV_Click()
Dim sql1 As String
Dim c As Integer
sql1 = "DELETE * FROM Cars WHERE [N_Car]='" & c & "'"
c = InputBox("Insert the ID of the car you want to remove.","Remove Car")
DoCmd.RunCommand (acCmdSelectAllRecords)
DoCmd.RunSQL sql1
Me.cCar.Requery
End Sub
Please help me :\
Comment