skwilliams
Registered User.
- Local time
- Today, 04:28
- Joined
- Jan 18, 2002
- Messages
- 516
I have a daily table with fields named "Date" and "Count" and weekly
table with fields named "Date", MonCount, TueCount, WedCount,
ThuCount, FriCount, and SatCount.
I would like to set it up where I can input the Monday date on the
Weekly Form and click the button to execute the SQL statement so the
Count field on the Monday form is moved to the MonCount field on the
Weekly table. Same with the other days of the week.
This is the code I have, but it's not working properly.
Private Sub Command390_Click()
On Error GoTo Err_Command390_Click
DoCmd.RunSQL "INSERT INTO[Total]([oRstMon]) SELECT [RstTot]FROM
[Daily] WHERE [Daily].[Date]=[Total].[Date]"
Exit_Command390_Click:
Exit Sub
Err_Command390_Click:
MsgBox Err.Description
Resume Exit_Command390_Click
End Sub
Can someone tell me the problem with this code? Or do I need something
different.
Thanks.
table with fields named "Date", MonCount, TueCount, WedCount,
ThuCount, FriCount, and SatCount.
I would like to set it up where I can input the Monday date on the
Weekly Form and click the button to execute the SQL statement so the
Count field on the Monday form is moved to the MonCount field on the
Weekly table. Same with the other days of the week.
This is the code I have, but it's not working properly.
Private Sub Command390_Click()
On Error GoTo Err_Command390_Click
DoCmd.RunSQL "INSERT INTO[Total]([oRstMon]) SELECT [RstTot]FROM
[Daily] WHERE [Daily].[Date]=[Total].[Date]"
Exit_Command390_Click:
Exit Sub
Err_Command390_Click:
MsgBox Err.Description
Resume Exit_Command390_Click
End Sub
Can someone tell me the problem with this code? Or do I need something
different.
Thanks.