In a production tracking database that I maintain, I have 13 tables that represent different departments. Once a day we append time card data (estimated) into the corresponding departments table. We can then run reports that give us our unit costs and other pertinent business information.
Because of the time consuming nature (due to my lack of access knowledge) we have never done updates to the time card data when the actuals are completed. Consequently we are always going to be a little bit off on our unit cost calculations.
I have come up with an SQL statement that I can run that will simplify the process of deleting the estimated time card data and then we can append the actual data and re-run the reports. I am including the SQL statement I am using to do the updates.
DoCmd.RunSQL "DELETE Embossing.*, Embossing.Date, Embossing.[Machine#] " & _ "FROM Embossing " & _ "WHERE (((Embossing.Date)= date from forms control ) " & _ "AND ((Embossing.[Machine#])=99));", 0
Could someone help me figure out a way to use a date in a form control inside as a variable inside my SQL statement.
The way my process would work is, the user opens a form, enters the date of the data they are going to delete, and then click on a command button that fires a VB function that contains the above referenced SQL statement.
My problem is getting the SQL statement to recognize the date value in the textbox control.
The forms name is “frmRptDates46”, the date control is “box1” and the command button is “button1”.
Any help is greatly appreciated.