General information
Category:
Forms & Form designer
Title:
Passing parameters to forms from a toolbar
I am trying to pass a parameter to a add/edit form to let the form know if its being open to add a new record or to edit an existing record. I use the following code in a commandgroup and it works okay. If I use the same code in a clickbutton event on a toolbar it doesn't see the variable that tells it if its a new record.
Any suggests?
***************************************************
Calling Command button click event:
public pfomodify
do form forms\frmmodify1 with .f. name pfomodify linked
The same commands are given for the buttonclick event of the toolbar.
Any reason for me to expect them to act differently?
***************************************************
The init method of the called form:
lparameters llNew
set console off
select recmstr
if isadd
lnNextReceipt_noID = recnum.receipt_id
insert into recmstr (depositnum, receipt_no, clerk, date_recvd) ;
values (depno.depositnum, recnum.rec_number, nclerk, zdate)
else
lnNextReceipt_noID = 0
endif
***************************************************
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only