I have a list box with a bound colum and a field on a form with another value.
In the click event of the list box I have it setting a another text box to the value of the bound colum, this works.
In the double click I have the following piece of code, but it deletes all namelk_ID in the system.
The namelk_ID may be assigned to 100 other records but when you dblclick it removes them from all, as if the code below does not see the and, but both values are there.
Message_Title = 'Confirm'
Message_Text = 'Are you sure you want to delete this name and name type?'
Dialog_Type = 4 + 32 + 0
nAnswer = MESSAGEBOX(Message_Text, Dialog_Type, Message_Title)
DO CASE
CASE nAnswer = 6
namelk_ID = VAL(Thisform.delete_name.value)
Vpm_id = Thisform.approval_id.value
SELECT PM_LK_PERMIT_NAME
DELETE FOR ((PM_LK_PERMIT_NAME.Key_id = Thisform.approval_id.value)AND (PM_LK_PERMIT_NAME.na_id = namelk_ID)) IN PM_LK_PERMIT_NAME
In the click event of the list box I have it setting a another text box to the value of the bound colum, this works.
In the double click I have the following piece of code, but it deletes all namelk_ID in the system.
The namelk_ID may be assigned to 100 other records but when you dblclick it removes them from all, as if the code below does not see the and, but both values are there.
Message_Title = 'Confirm'
Message_Text = 'Are you sure you want to delete this name and name type?'
Dialog_Type = 4 + 32 + 0
nAnswer = MESSAGEBOX(Message_Text, Dialog_Type, Message_Title)
DO CASE
CASE nAnswer = 6
namelk_ID = VAL(Thisform.delete_name.value)
Vpm_id = Thisform.approval_id.value
SELECT PM_LK_PERMIT_NAME
DELETE FOR ((PM_LK_PERMIT_NAME.Key_id = Thisform.approval_id.value)AND (PM_LK_PERMIT_NAME.na_id = namelk_ID)) IN PM_LK_PERMIT_NAME