Microsoft Access 2013 Specify the table where you want to delete from (1 Viewer)

marlind618

Registered User.
Local time
Today, 11:43
Joined
May 22, 2013
Messages
15
DELETE tblpublicrecordslog.VisReqNum, tblpublicrecordslog.RequestNumber, tblpublicrecordslog.FYDateRX, tblpublicrecordslog.dbreqlogid, tblpublicrecordstimesheet.dbreqlogid
FROM tblpublicrecordslog LEFT JOIN tblpublicrecordstimesheet ON tblpublicrecordslog.[dbreqlogid] = tblpublicrecordstimesheet.[dbreqlogid]
WHERE (((tblpublicrecordslog.dbreqlogid)=[Forms]![frmrequestfinder]![dbreqlogid]) AND ((tblpublicrecordstimesheet.dbreqlogid) Is Null));
/QUOTE]
tblpublicrecordslog contains data for public records. tblpublicrecordstimesheet contains time spent for that record. If there are no records for dbreqlogid in the tblpublicrecordstimesheet The user will be given the option to delete it. I am getting Delete the table where you want to delete from message. Can someone help? Thanks.
 

JHB

Have been here a while
Local time
Today, 19:43
Joined
Jun 17, 2012
Messages
7,732
Try the below:
DELETE * FROM tblpublicrecordslog LEFT JOIN tblpublicrecordstimesheet ON tblpublicrecordslog.[dbreqlogid] = tblpublicrecordstimesheet.[dbreqlogid]
WHERE (((tblpublicrecordslog.dbreqlogid)=[Forms]![frmrequestfinder]![dbreqlogid]) AND ((tblpublicrecordstimesheet.dbreqlogid) Is Null));
 

Users who are viewing this thread

Top Bottom