Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert User inputted Date from a Form into a make table query

Status
Not open for further replies.

dbar10

Programmer
Joined
Dec 5, 2008
Messages
196
Location
US
Can't seem to get my head around this one. I am upgrading a database that keeps track of employee attendance points. I have built a Macro that runs a series of queries to update records and such on an employees record. The problem I'm having is I have made a make table query to form the record so that I can append that info to an employee record. But I cannot get the date into the record. I am using a date that is entered on the DataPosterfrm. How can I get this TRDATE from the form into my record on the make-table query? The make table query is below. Thanks

SELECT EMASTER.DEPT, "C" AS [EXCEPTION], "*** COMPUTER REWARD ***" AS REMARKS, "C" AS ECODE, "N" AS FMLATIME, 0 AS OCC, 0 AS HRSMISS, [Comp Rewards Monthly]!EligiblePts AS ROCC, -[Comp Rewards Monthly]!EligiblePts AS TOCC, [Comp Rewards Monthly]!FILENO AS FILENO, Forms!DataPosterfrm!DatePost AS TRDATE, "Manual" AS DAYSEQ INTO EhnottmMock
FROM EMASTER INNER JOIN [Comp Rewards Monthly] ON EMASTER.FILENO = [Comp Rewards Monthly].FILENO;
 
What's happening with the current query? Are you getting the wrong results in the field? What is the format of your date in the DatePost control?

Duane
Hook'D on Access
MS Access MVP
 
does this return any records

Code:
SELECT EMASTER.DEPT, "C" AS [EXCEPTION], "*** COMPUTER REWARD ***" AS REMARKS, "C" AS ECODE, "N" AS FMLATIME, 0 AS OCC, 0 AS HRSMISS, [Comp Rewards Monthly]!EligiblePts AS ROCC, -[Comp Rewards Monthly]!EligiblePts AS TOCC, [Comp Rewards Monthly]!FILENO AS FILENO, Forms!DataPosterfrm!DatePost AS TRDATE, "Manual" AS DAYSEQ FROM EMASTER INNER JOIN [Comp Rewards Monthly] ON EMASTER.FILENO = [Comp Rewards Monthly].FILENO
 
Thanks dhookom, you know sometimes just get too close to the forest to see the trees. I matched the date format on both the table and the form and it worked fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top