Microsoft
Software
Hardware
Network
Question : Access 2003:Sub form record deletion problem
In a front/back end database, my problem is to delete a record in only one of the 2 tables that make the query that populates a subform.
A group of client identified by CCANPrime can have several CCAN associated with the group. T
tbl_ar_selection stores the CCANPRIME, Relationship and CCAN.
tbl_il_extract_cst_01 stores the names of the CCAN (entry cannot be deleted)
The subform (frm_sub) is populated by a query
SELECT tbl_ar_selection.CCANPrime
, tbl_ar_selection.Relations
hip, tbl_ar_selection.CCAN,
IIf(IsNull(tbl_il_extract_
cst_01!cca
n),"THIS CCAN IS NOT VALID",[cust_name]) AS [cust name]
FROM tbl_ar_selection LEFT JOIN tbl_il_extract_cst_01 ON tbl_ar_selection.CCAN = tbl_il_extract_cst_01.ccan
The subform is in continuous format and each record has a delete button.
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
When the delete command is activated, the record in tbl_il_extract_cst_01 is deleted together with the record in tbl_ar_selection.
How can I leave the data in tbl_il_extract_cst_01 intact and only delete the record in tbl_ar_selection
I hope I made myself clear. I am not a professional and want I know about VBA and Access 2003 is self thought
Any help would be appreciated
Answer : Access 2003:Sub form record deletion problem
After several hours, I opted for
=DLookUp("[cust_name]","tb
l_il_extra
ct_cst_01"
,"[ccan]= '" & Forms!frm_main!frm_main_su
b_ccan!cca
n & "'")
Not as quick, but does the job
Random Solutions
MS Access Radio Button and Text Field Required....
Error Code: 403 Forbidden The server denied the specified Uniform Resource Locator (URL).
Disable Enter key in Datagrid
Difference between Server 2003 Appliance edition and server 2003 R2
SQL Reporting Services - Format Datetime {0:D} culture?
How to Call MDI Child Events from MDI Parent...not all MDI Children are the same form
SQL statement (left join) not working as expected
I need help with DoCmd.DoMenuItem acFormBar command number
Adding an attribute to the xml root using FOR XML PATH syntax
How do I restore a Mirror in SQL Server 2005 when it is in a "Unsynchronized Disconnected / In Recovery" state?