automatic combo box selection on opening form

Dear all, I have a form where on opening it, automatically combo box selection to be selected as check . I was trying in Active method as below where some fields gets disabled. but here Paymmode combo box to be taken as check on opening the form. Please let me know a solution for the same.

If(ledgerjournaltable.JournalName ==“APPayCheck”)
{
ledgerJournalTrans_ds.object(fieldnum(LedgerJournalTrans, PaymentStatus)).allowEdit(true);
buttonPaymReconciliation.enabled(true);
ledgerJournalTrans_ds.object(fieldnum(LedgerJournalTrans,Paymmode)).allowEdit(true);
ledgerJournalTrans_ds.object(fieldnum(LedgerJournalTrans,BankChequeNum)).allowEdit(false);
ledgerJournalTrans_ds.object(fieldnum(LedgerJournalTrans,BankChequeNum)).allowEdit(false);
ledgerJournalTrans_ds.object(fieldnum(LedgerJournalTrans,BankChequeNum)).
}

Thanks…