Topic: ComboBox Values
I tried to display appropriate combo box values. If I click on Add or Edit sale invoice button on form1, I wanted to display 'Sale' combo value in combo box Inv Type on Invoice form and so on.
Tried buttons after click and frmInvoice onShow events but both didn't work.
procedure Form1_btnPurchEdit_OnAfterClick (Sender: string);
begin
frmInvoice.cbInvoiceDBCR.Text := 'Purchase';
end;
procedure Form1_btnPurchAdd_OnAfterClick (Sender: string);
begin
frmInvoice.cbInvoiceDBCR.Text := 'Purchase';
end;
procedure Form1_btnSaleEditRefund_OnAfterClick (Sender: string);
begin
frmInvoice.cbInvoiceDBCR.Text := 'Purchase Refund';
end;
....
procedure frmInvoice_OnShow (Sender: string; Action: string);
begin
if Form1.btnPurchAdd.click then
begin
frmInvoice.cbInvoiceDBCR.Text := 'Purchase';
end;
end;
..........
Ps/. I used Derek's custom line on combobox.
Please see the attached sample project if needed
God... please help me become the person my dog thinks I am.