Subject |
Re: Form to Form |
From |
Lee Grant <camilee@nospam.comcast.net> |
Date |
Mon, 12 Jun 2023 02:21:08 -0400 |
Newsgroups |
dbase.getting-started |
Peter,
In addition, the following is from my TripList form, that once it has
the links to the parent's queries it can use it's own buttons to process
the data on the form itself, like so:
Here, is the method for a button that is going to create a new entry in
the triplist database, by appending a new entry by emptying the fields
if there was a prior entry of information in it, copying the pronumber
into the proper field and vacating the rest to be filled in, and then
the next function, saves the entry. In that method, you see where I use
this opportunity to save the data into the one query's rowset
(triplistdata) and then in the next line, refresh the other query's
rowset (triplistvisual) so it can display the changes. and refresh the
grids that are on the parent form.
function TPBNEW_onClick()
form.triplistdata.rowset.beginappend()
if form.triplistdata.rowset.fields["cprono"].value == NULL or;
form.eftripcprono1.value == NULL
form.triplistdata.rowset.fields["cprono"].value = tlpn
form.eftripcprono1.value = tlpn
endif
form.triplistvisual.rowset.refresh()
form.parent.grid1.refresh()
form.parent.grid2.refresh()
form.eftlstatusorder.setfocus()
return
function TPBSAVE_onClick()
if form.triplistdata.rowset.fields["cprono"].value == NULL
form.triplistdata.rowset.fields["cprono"].value = tlpn
endif
form.triplistdata.rowset.save()
form.triplistvisual.rowset.refresh()
form.parent.grid1.refresh()
form.parent.grid2.refresh()
form.close()
return
I'm hoping this will help you see some of the implementation that the
FORMVARS.HOW document will look like when you get to that point.
Lee
|
|