|
| Doesn' Show |
 |
Thu, 13 Mar 2008 17:44:04 -050 |
|
| Post Reply
|
| Re: Doesn' Show |
 |
Thu, 13 Mar 2008 20:20:07 -040 |
Bob McKinney wrote:
> Using dB+2.6 w/XPpro. I have a lineitem form that calls my inventory
table, via another form which displays the Inventory table contents in a grid
and provides for a selected rowset to pass rowset data back to the lineitem
form. The inv/table has two fields that contains description info. Field 1 is
an entry field, field2 is an editor field. I'm trying to display these two
fields on the lineitem form, after selecting a rowset and returning to the
lineitem form. No luck, they are frozen to another rowset. These two fields are
not in the lineitem table. I only wish to display them on the lineitem form for
the user's benefit. I have the two disabled fields datalinked to the
inv/table's field1 and field2. All other needed items in the inv/rowset are
passed to the lineitem form as needed. Any ideas why not field1 and field2?...
Bob
Here's how I do it:
There is a function in the lineitem form that calls the inventory lookup form.
In
that function, I would open the inventory form with readModal().
Then the user works in the inventory form. When that form is closed by the user,
the program returns control back to the function in the lineitem form.
At this point, in the lineitem form, I read the data from the rowset in the
child
form and enters it into fields on the lineitem form.
Here is some code from one of my programs.
set procedure to insLookup.wfm addi
local oChild
oChild = new insLookupForm()
oChild.InsName = ""
oChild.mdi = false
oChild.readModal()
if not empty(oChild.insName)
form.entryfield1.value=oChild.rowset.fields['field1'].value
form.entryfield2.value=oChild.rowset.fields['field2'].value
endif
oChild.release()
close procedure insLookup.wfm
btw: the oChild.InsName property is my way of controlling whether the user
cancels
the child (inventory) form or does a look-up. In the child form, the OK button
puts a value in this property; while the cancel button leaves the property
empty.
|
| Post Reply
|
| Re: Doesn' Show |
 |
Fri, 14 Mar 2008 10:31:06 -050 |
Michael Nuwer Wrote:
> Bob McKinney wrote:
> > Using dB+2.6 w/XPpro. I have a lineitem form that calls my inventory
table, via another form which displays the Inventory table contents in a grid
and provides for a selected rowset to pass rowset data back to the lineitem
form. The inv/table has two fields that contains description info. Field 1 is
an entry field, field2 is an editor field. I'm trying to display these two
fields on the lineitem form, after selecting a rowset and returning to the
lineitem form. No luck, they are frozen to another rowset. These two fields are
not in the lineitem table. I only wish to display them on the lineitem form for
the user's benefit. I have the two disabled fields datalinked to the
inv/table's field1 and field2. All other needed items in the inv/rowset are
passed to the lineitem form as needed. Any ideas why not field1 and field2?...
Bob
>
>
> Here's how I do it:
>
> There is a function in the lineitem form that calls the inventory lookup
form. In
> that function, I would open the inventory form with readModal().
>
> Then the user works in the inventory form. When that form is closed by the
user,
> the program returns control back to the function in the lineitem form.
>
> At this point, in the lineitem form, I read the data from the rowset in the
child
> form and enters it into fields on the lineitem form.
>
> Here is some code from one of my programs.
>
> set procedure to insLookup.wfm addi
> local oChild
> oChild = new insLookupForm()
> oChild.InsName = ""
> oChild.mdi = false
> oChild.readModal()
> if not empty(oChild.insName)
> form.entryfield1.value=oChild.rowset.fields['field1'].value
> form.entryfield2.value=oChild.rowset.fields['field2'].value
> endif
> oChild.release()
> close procedure insLookup.wfm
>
> btw: the oChild.InsName property is my way of controlling whether the user
cancels
> the child (inventory) form or does a look-up. In the child form, the OK
button
> puts a value in this property; while the cancel button leaves the property
empty.
> Back in the parent form I check that value before reading the child
rowset.
>>>
Thanks for the reply Michael. Below is the 'onClick' code I'm using (from the
lineitemedit.wfm). All lines in the if/endif stmt work OK except the lines
marked ->. These lines draw an 'invalid descriptive' error msg. That I
don't understand since these are the names of the table fields, spelling double
checked. Possible clue, the problem fields on the line..wfm form are displaying
the locked inv..field values when the line...wfm is opened in the append mode
while the other fields in the if/endif stmt are blank, as they should be.
// Code below is modified code from the Dive Tutorial by Michael Nuwer
function FindPartNo_onClick
local f, rs
set procedure to InventoryLookUp.wfm
f = new InventoryLookUpForm()
f.mdi = false
f.mode = 'Modal'
f.text = 'Select a Part Number'
f.PartNumberField = 'PartNumber'
f.autoCenter = true
f.menuFile = ""
f.selectedPartNumber = ""
f.readModal()
if not empty(f.selectedPartNumber)
rs = form.invoicesDataModule1.lineItem1.rowset
rs.fields['PartNumber'].value = ;
f.selectedPartNumber
rs.fields['Price'].value = ;
f.rowset.fields['Price'].value
rs.fields['Units ID'].value = ; // pricing units
f.rowset.fields['Units ID'].value
rs.fields['Deptment'].value = ; // ordering dept
f.rowset.fields['Deptment'].value
-> rs.fields['Description'].value = ; // 30 space ch field
f.rowset.fields['Description'].value
-> rs.fields['Catalog Description'].value = ; // memo field
f.rowset.fields['Catalog Description'].value
rs.refreshControls()
endif
f.release()
close procedure InventoryLookUp.wfm
form.setFocus()
return
I hope this is a clue to my problem. Thanks again Michael...Bob
|
| Post Reply
|
| Re: Doesn' Show |
 |
Fri, 14 Mar 2008 23:42:32 -040 |
In article <vfRorhehIHA.384@news-server>, bmckinney721@bellsouth.net
says...
> Thanks for the reply Michael. Below is the 'onClick' code I'm using (from
the lineitemedit.wfm). All lines in the if/endif stmt work OK except the lines
marked ->. These lines draw an 'invalid descriptive' error msg. That I
don't understand since these are the names of the table fields, spelling double
checked. Possible clue, the problem fields on the line..wfm form are displaying
the locked inv..field values when the line...wfm is opened in the
append mode while the other fields in the if/endif stmt are blank, as they
should be.
> // Code below is modified code from the Dive Tutorial by Michael Nuwer
> function FindPartNo_onClick
> local f, rs
> set procedure to InventoryLookUp.wfm
> f = new InventoryLookUpForm()
> f.mdi = false
> f.mode = 'Modal'
> f.text = 'Select a Part Number'
> f.PartNumberField = 'PartNumber'
> f.autoCenter = true
> f.menuFile = ""
> f.selectedPartNumber = ""
> f.readModal()
> if not empty(f.selectedPartNumber)
> rs = form.invoicesDataModule1.lineItem1.rowset
> rs.fields['PartNumber'].value = ;
> f.selectedPartNumber
> rs.fields['Price'].value = ;
> f.rowset.fields['Price'].value
> rs.fields['Units ID'].value = ; // pricing units
> f.rowset.fields['Units ID'].value
> rs.fields['Deptment'].value = ; // ordering dept
> f.rowset.fields['Deptment'].value
> -> rs.fields['Description'].value = ; // 30 space ch field
> f.rowset.fields['Description'].value
> -> rs.fields['Catalog Description'].value = ; // memo field
> f.rowset.fields['Catalog Description'].value
> rs.refreshControls()
> endif
> f.release()
> close procedure InventoryLookUp.wfm
> form.setFocus()
> return
> I hope this is a clue to my problem. Thanks again Michael...Bob
Bob,
Since rs = form.invoicesDataModule1.lineItem1.rowset
can you show us what you have inside that dataModule for the LineItem1
QUERY?
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
|
| Post Reply
|
| Re: Doesn' Show |
 |
Sat, 15 Mar 2008 03:53:28 -050 |
Geoff Wass [dBVIPS] Wrote:
> In article <vfRorhehIHA.384@news-server>, bmckinney721@bellsouth.net
> says...
> > Thanks for the reply Michael. Below is the 'onClick' code I'm using
(from the lineitemedit.wfm). All lines in the if/endif stmt work OK except the
lines marked ->. These lines draw an 'invalid descriptive' error msg. That
I
> don't understand since these are the names of the table fields, spelling
double checked. Possible clue, the problem fields on the line..wfm form are
displaying the locked inv..field values when the line...wfm is opened in the
> append mode while the other fields in the if/endif stmt are blank, as they
should be.
> > // Code below is modified code from the Dive Tutorial by Michael
Nuwer
> > function FindPartNo_onClick
> > local f, rs
> > set procedure to InventoryLookUp.wfm
> > f = new InventoryLookUpForm()
> > f.mdi = false
> > f.mode = 'Modal'
> > f.text = 'Select a Part Number'
> > f.PartNumberField = 'PartNumber'
> > f.autoCenter = true
> > f.menuFile = ""
> > f.selectedPartNumber = ""
> > f.readModal()
> > if not empty(f.selectedPartNumber)
> > rs = form.invoicesDataModule1.lineItem1.rowset
> > rs.fields['PartNumber'].value = ;
> > f.selectedPartNumber
> > rs.fields['Price'].value = ;
> > f.rowset.fields['Price'].value
> > rs.fields['Units ID'].value = ; // pricing units
> > f.rowset.fields['Units ID'].value
> > rs.fields['Deptment'].value = ; // ordering dept
> > f.rowset.fields['Deptment'].value
> > -> rs.fields['Description'].value = ; // 30 space ch
field
> > f.rowset.fields['Description'].value
> > -> rs.fields['Catalog Description'].value = ; // memo
field
> > f.rowset.fields['Catalog Description'].value
> > rs.refreshControls()
> > endif
> > f.release()
> > close procedure InventoryLookUp.wfm
> > form.setFocus()
> > return
> > I hope this is a clue to my problem. Thanks again Michael...Bob
>
>
>
> Bob,
>
> Since rs = form.invoicesDataModule1.lineItem1.rowset
>
> can you show us what you have inside that dataModule for the LineItem1
> QUERY?
>
> --
> Geoff Wass [dBVIPS]
> Montréal, Québec, Canada
>
>>>
Geoff: Below are the only lines of code in Invoices.dmd that refers to
lineitem1.
this.LINEITEM1 = new QUERY()
this.LINEITEM1.parent = this
with (this.LINEITEM1)
canOpen = class::LINEITEM1_CANOPEN
onOpen = class::LINEITEM1_ONOPEN
left = 384.0
top = 5.0
width = 114.0
height = 196.0
database = form.bobsbiz1
sql = 'Select * from "LineItem"'
active = true
endwith
with (this.LINEITEM1.rowset)
fields["Units ID"].lookupSQL = "select * from units"
autoEdit = false
indexName = "INVOICENO"
masterRowset = form.invoices1.rowset
masterFields = "InvoiceNumber"
endwith
|
| Post Reply
|
|
|
|
|
|
|
|
|
|