R
RussCRM
I'm trying to do an append query where I add records to my "Services"
table where "Option1" (in this case bound to a checkbox on a form)
from my Guest table is "true". I will be adding the following fields
to my Services table: ServicesLink (a link to the GuestID in my guest
table), ServicesDate (comes from the form I am using to display the
checkmarks) and ServicesType, which I am adding through an expression.
The ServicesLink and ServicesType are adding fine, but for some
reason, I can't get the date from the txtServiceDate field from my
form. I think I might have the syntax wrong.
Could someone look at my code and let me know?
INSERT INTO Services ( ServicesLink, ServicesDate, ServicesType )
SELECT Services.ServicesLink, Forms!frmServicesEntry!txtServiceDate AS
NewServicesDate, "Breakfast" AS NewServiceType
FROM Guest INNER JOIN Services ON Guest.ID = Services.ServicesLink
GROUP BY Services.ServicesLink, Forms!frmServicesEntry!txtServiceDate,
"Breakfast", Guest.Option1
HAVING (((Guest.Option1)=-1));
table where "Option1" (in this case bound to a checkbox on a form)
from my Guest table is "true". I will be adding the following fields
to my Services table: ServicesLink (a link to the GuestID in my guest
table), ServicesDate (comes from the form I am using to display the
checkmarks) and ServicesType, which I am adding through an expression.
The ServicesLink and ServicesType are adding fine, but for some
reason, I can't get the date from the txtServiceDate field from my
form. I think I might have the syntax wrong.
Could someone look at my code and let me know?
INSERT INTO Services ( ServicesLink, ServicesDate, ServicesType )
SELECT Services.ServicesLink, Forms!frmServicesEntry!txtServiceDate AS
NewServicesDate, "Breakfast" AS NewServiceType
FROM Guest INNER JOIN Services ON Guest.ID = Services.ServicesLink
GROUP BY Services.ServicesLink, Forms!frmServicesEntry!txtServiceDate,
"Breakfast", Guest.Option1
HAVING (((Guest.Option1)=-1));