I have a form that I want to change the display depending on the type of transaction. If I open the form from another display, the form displays correctly but if I PgDn or PgUp for the precious or next record and the transaction is a different type, the display will not change to the correct display for that type transaction.
I have put the below Xbasic coding in the form 'onfetch', 'onactivate', and 'oninit' to try and get this to work without any luck.
Please advise if you can help
Don
if parentform.trnstype.value = "P" then
parentform.button3.show()
parentform.button4.show()
parentform.button5.hide()
parentform.button7.show()
parentform.button8.show()
parentform.button9.show()
parentform.field13.show()
parentform.paydate.hide()
parentform.payamt.hide()
end if
if parentform.trnstype.value = "D" .or. parentform.trnstype.value = "V" then
parentform.button3.hide()
parentform.button4.hide()
parentform.button5.hide()
parentform.button7.hide()
parentform.button8.hide()
parentform.button9.hide()
parentform.field13.hide()
end if
if parentform.ptype.value = "R" then
parentform.button3.hide()
parentform.button4.hide()
parentform.button5.show()
parentform.button7.hide()
parentform.button8.hide()
parentform.button9.hide()
parentform.field13.hide()
parentform.renewal_LBL.hide()
parentform.redeemamt_LBL.hide()
parentform.renewal.hide()
parentform.redeemamt.hide()
parentform.paydate.show()
parentform.payamt.show()
end if
I have put the below Xbasic coding in the form 'onfetch', 'onactivate', and 'oninit' to try and get this to work without any luck.
Please advise if you can help
Don
if parentform.trnstype.value = "P" then
parentform.button3.show()
parentform.button4.show()
parentform.button5.hide()
parentform.button7.show()
parentform.button8.show()
parentform.button9.show()
parentform.field13.show()
parentform.paydate.hide()
parentform.payamt.hide()
end if
if parentform.trnstype.value = "D" .or. parentform.trnstype.value = "V" then
parentform.button3.hide()
parentform.button4.hide()
parentform.button5.hide()
parentform.button7.hide()
parentform.button8.hide()
parentform.button9.hide()
parentform.field13.hide()
end if
if parentform.ptype.value = "R" then
parentform.button3.hide()
parentform.button4.hide()
parentform.button5.show()
parentform.button7.hide()
parentform.button8.hide()
parentform.button9.hide()
parentform.field13.hide()
parentform.renewal_LBL.hide()
parentform.redeemamt_LBL.hide()
parentform.renewal.hide()
parentform.redeemamt.hide()
parentform.paydate.show()
parentform.payamt.show()
end if
Comment