Hi
I've had this problem before and it got solved, except it was with numeric values.
This time it's with text, and I'm doing it as I did with the numbers.. But it isn't working.
I have this code in a button:
It shows me the inputbox, then asks me for a parameter. If I input John on the inputbox and John when SQL asks me for a parameter, it will delete John.
The problem here is that I don't want the parameter box to show up asking me for the same thing.
Thanks for any assistance.
I've had this problem before and it got solved, except it was with numeric values.
This time it's with text, and I'm doing it as I did with the numbers.. But it isn't working.
I have this code in a button:
Code:
Private Sub cmdDelName_Click()
Dim sql2 As String
Dim n As String
n = InputBox("Which name do you want to remove?", "Remove name")
sql2 = "DELETE * FROM Names WHERE [Name]=" & n
DoCmd.SetWarnings False
DoCmd.RunSQL sql2
DoCmd.SetWarnings True
Me.NameSt.Requery
Me.NameEnd.Requery
End Sub
The problem here is that I don't want the parameter box to show up asking me for the same thing.
Thanks for any assistance.
Comment