Hi
I have a project going.
I want to add todays date to selected record when a user press a button.
I have a listbox called : ListPicker
I have a button called: hideuser_button
I have a table called: Profile_Table
In this table i have a DATE column called: ProfileArchive
When the user press the button i want to add todays date to the column ProfileArchive on the selected record in the listbox.
The button i located in the form called: SelectProfile_Form
I have so far this code
Code:
Private Sub DeleteProfile_Button_Click()
Dim strSQL As String
strSQL = "UPDATE Profile_Table SET [ProfileArchive]= Date() WHERE Profile_ID = " & Forms!SelectProfile_Form!ListPicker
CurrentDb.Execute strSQL
End Sub
or this code
Code:
CurrentDb.Execute "UPDATE Profile_Table SET [ProfileArchive]=Date() WHERE Log_ID=" & Form_SelectProfile_Form.ListPicker
Form_SelectProfile_Form.ListPicker.Requery
But none of them work.
I get this error message
http://prntscr.com/haxdb7
I have this post going on another forum
https://www.mrexcel.com/forum/micros...ml#post4951398
But i have so far not found a solution from all the great help there so far. I hope someone here can figure out why my codes wont work or have another solution.
I hope noone consider this crossposting, if so please delete my post here.