G
Guest
Good afternoon
I've decided to make my application into a DAP for data entry only. Once the DAP is filled out, I want to run an event procedure/script that will add the data from the DAP into my data table. The crux of this is that I can't seem to use VBA in the Script Editor. I'm merely looking to run some SQL Inserts and Updates, really. Here's the code from the Access form version of the same DAP
Sub Done_Click(
DoCmd.RunSQL "INSERT INTO tblrequests ([UserName], [UserDiv], [Dept], [Function], [Supervisor], [Reason], [Current], [Desc], [Notes], [Flagged], [ReqStatus], [Aisles]) VALUES (Forms!frmRequest.UserName, Forms!frmRequest.UserDiv, Forms!frmRequest.DeptName, Forms!frmRequest.FunctName, Forms!frmRequest.Super, Forms!frmRequest.Reason, Forms!frmRequest.CurrentStd, Forms!frmRequest.TaskDesc, Forms!frmRequest.Notes, True, 'Requested', Forms!frmRequest.Level)
DoCmd.SendObject acSendQuery, "qryNewReqs", acFormatXLS, "Derek Wittman", fOSUserName() & "; " & Forms!frmRequest.Super, , "A New Request for Engineered Labor Standards from " & UserDiv, "Attached, you will find a request for Engineered Labor Standards", Fals
DoCmd.RunSQL "Update tblRequests set Flagged = False where UserName = dlookup('[UserName]','tblUserList','UserID = fOSUserName()')
DoCmd.Clos
End Su
Any and all help would be appreciated (as always, watch out for the word wrap)
Thank you
Derek
I've decided to make my application into a DAP for data entry only. Once the DAP is filled out, I want to run an event procedure/script that will add the data from the DAP into my data table. The crux of this is that I can't seem to use VBA in the Script Editor. I'm merely looking to run some SQL Inserts and Updates, really. Here's the code from the Access form version of the same DAP
Sub Done_Click(
DoCmd.RunSQL "INSERT INTO tblrequests ([UserName], [UserDiv], [Dept], [Function], [Supervisor], [Reason], [Current], [Desc], [Notes], [Flagged], [ReqStatus], [Aisles]) VALUES (Forms!frmRequest.UserName, Forms!frmRequest.UserDiv, Forms!frmRequest.DeptName, Forms!frmRequest.FunctName, Forms!frmRequest.Super, Forms!frmRequest.Reason, Forms!frmRequest.CurrentStd, Forms!frmRequest.TaskDesc, Forms!frmRequest.Notes, True, 'Requested', Forms!frmRequest.Level)
DoCmd.SendObject acSendQuery, "qryNewReqs", acFormatXLS, "Derek Wittman", fOSUserName() & "; " & Forms!frmRequest.Super, , "A New Request for Engineered Labor Standards from " & UserDiv, "Attached, you will find a request for Engineered Labor Standards", Fals
DoCmd.RunSQL "Update tblRequests set Flagged = False where UserName = dlookup('[UserName]','tblUserList','UserID = fOSUserName()')
DoCmd.Clos
End Su
Any and all help would be appreciated (as always, watch out for the word wrap)
Thank you
Derek