N nhood42 New member Local time Yesterday, 18:42 Joined May 19, 2016 Messages 1 May 19, 2016 #1 Without copy/pasting, how can I enter the same date in multiple rows(50-100 consecutive). Also multiple dates are in the same table. Thanks
Without copy/pasting, how can I enter the same date in multiple rows(50-100 consecutive). Also multiple dates are in the same table. Thanks
I informer Registered User. Local time Today, 03:42 Joined May 25, 2016 Messages 75 May 25, 2016 #2 Hi nhood42 With a VBA program but what do you mean by "enter"? Add or update records? For adding records with the same date, call this code on click event button Code: sDate ="#07/25/2016#" For i to 100 sqlINSERT = "INSERT INTO tableName ( field) VALUES (" & sDate & ")" DoCmd.RunSQL = sqlINSERT next i Last edited: May 25, 2016
Hi nhood42 With a VBA program but what do you mean by "enter"? Add or update records? For adding records with the same date, call this code on click event button Code: sDate ="#07/25/2016#" For i to 100 sqlINSERT = "INSERT INTO tableName ( field) VALUES (" & sDate & ")" DoCmd.RunSQL = sqlINSERT next i
S sneuberg AWF VIP Local time Yesterday, 19:42 Joined Oct 17, 2014 Messages 3,504 May 25, 2016 #3 More like Code: Dim sDate As String Dim i As Long Dim sqlINSERT As String sDate = "#7/25/2016#" sqlINSERT = "INSERT INTO tableName ( field) VALUES (" & sDate & ")" For i = 1 To 100 DoCmd.RunSQL sqlINSERT Next i
More like Code: Dim sDate As String Dim i As Long Dim sqlINSERT As String sDate = "#7/25/2016#" sqlINSERT = "INSERT INTO tableName ( field) VALUES (" & sDate & ")" For i = 1 To 100 DoCmd.RunSQL sqlINSERT Next i