insert same date into column

cikwan82

Registered User.
Local time
Today, 07:38
Joined
Dec 10, 2013
Messages
45
Hai every one,
i have form with these info : customer (Table), EnterDate (Button) and customersub (subform), i want to enter date into Date column using form with button.

example

ID name sample date
1. John A ....
2. Michel B ....
3. Jack C .....

into like this

ID name sample date
1. John A 2/2/2014
2. Michel B 2/2/2014
3. Jack C 2/2/2014


i try this this sql. but the date only insert/update for avery row i was select.
Q: how i can make sure i put one date.. it will insert for every row jus one click.

Private Sub EnterDate_Click()

CurrentDb.Execute "UPDATE Customer " & _
"SET Date='" & Me.insertdate & "'" & _
"WHERE ID= " & Me.Costumersub.Form.Recordset.Fields("ID")


End Sub

:(
 

Attachments

  • Date.jpg
    Date.jpg
    29 KB · Views: 104
1) for dates use ## instead of ''
2) just remove your where ... = id part to make it apply to all records
 
Thank you my friend.. u are awesome...:)
 

Users who are viewing this thread

Back
Top Bottom