Lady Gragor
Registered User.
- Local time
- Today, 12:21
- Joined
- Nov 4, 2008
- Messages
- 37
Hello would somebody please help me to work out this append query?
INSERT INTO tbl_AppendTimesheetInput ( FirstName, LastName, JobNo, [Sub Job], Hours, [Hourly Charge], Amount, Division, RegoNo )
SELECT DISTINCT
'These fields are on subform 1 (This is working)
tbl_Employee.FirstName, tbl_Employee.LastName,
'These fields are on subform 2 (This is working)
qry_CurrentTimesheet.JobNo, qry_CurrentTimesheet.[Sub Job], qry_CurrentTimesheet.Hours, qry_CurrentTimesheet.[Hourly Charge], qry_CurrentTimesheet.Calculated, qry_CurrentTimesheet.Division,
'These fields are on the main form (Here is the problem)
(Forms!frm_VehicleTimeSheet!cbo_RegoNo) AS RegoNo, DateValue(Forms!frm_Vehicletimesheet!Date) AS [Date]
FROM tbl_Employee, qry_CurrentTimesheet
WHERE (((tbl_Employee.Group)=True));
It asks for parameter values for the main form. I gather this is a referencing issue but uncertain on how to resolve this.
I would really appreciate any advise as this is driving me nuts.
INSERT INTO tbl_AppendTimesheetInput ( FirstName, LastName, JobNo, [Sub Job], Hours, [Hourly Charge], Amount, Division, RegoNo )
SELECT DISTINCT
'These fields are on subform 1 (This is working)
tbl_Employee.FirstName, tbl_Employee.LastName,
'These fields are on subform 2 (This is working)
qry_CurrentTimesheet.JobNo, qry_CurrentTimesheet.[Sub Job], qry_CurrentTimesheet.Hours, qry_CurrentTimesheet.[Hourly Charge], qry_CurrentTimesheet.Calculated, qry_CurrentTimesheet.Division,
'These fields are on the main form (Here is the problem)
(Forms!frm_VehicleTimeSheet!cbo_RegoNo) AS RegoNo, DateValue(Forms!frm_Vehicletimesheet!Date) AS [Date]
FROM tbl_Employee, qry_CurrentTimesheet
WHERE (((tbl_Employee.Group)=True));
It asks for parameter values for the main form. I gather this is a referencing issue but uncertain on how to resolve this.
I would really appreciate any advise as this is driving me nuts.