B
bdp via AccessMonster.com
I'm "learning by doing", so it's likely that I've done something obviously
wrong but can't see it - so here's a cry for help. Situation: Form (invoice)
and subform (line items), the first in form view, the second as continuous
forms, each bound to its table (invoice: PK is invoice number, and invoice
lines, PK is invoice number and product number). Looks like Northwind's
order/order details tables.
As soon as I enter the product number in the first line of the subform (allow
additions, deletions, edits = true, dataentry = false), it shows the selected
product's details in that line (record selector = pencil, so not yet saved)
and repeats it in the "next" (i.e. new) record (asterisk in the record
selector). The only difference between the two is that the "asterisk" line
doesn't contain the product number that I'd entered - but the rest of the
data is repeated.
When I tab out of the last text box on the first record, a "LostFocus"
procedure saves the record I've just left and goes to the next record. On
the screen, the line I'd been entering now has a blank record selector, the
line originally carrying the asterisk now has a right-pointing arrow (it's
been saved), but still no product number (though the invoice lines table does
have that product number).
If I then click in the first record (the one I entered originally), its
record selector changes to the right-arrow symbol, and the second record
(still showing the copy of what I entered but without the product number)
gets its asterisk back. I click in that second record to change it to a new
product, the first one reverts to a pencil and the focus goes to the next
field in that first record.
In short, I can't get beyond entering one record, and I'm becoming
exceedingly frustrated ... so what am I doing wrong? It must be simple, I've
probably been looking at it for hours and not recognised it.
Brian.
wrong but can't see it - so here's a cry for help. Situation: Form (invoice)
and subform (line items), the first in form view, the second as continuous
forms, each bound to its table (invoice: PK is invoice number, and invoice
lines, PK is invoice number and product number). Looks like Northwind's
order/order details tables.
As soon as I enter the product number in the first line of the subform (allow
additions, deletions, edits = true, dataentry = false), it shows the selected
product's details in that line (record selector = pencil, so not yet saved)
and repeats it in the "next" (i.e. new) record (asterisk in the record
selector). The only difference between the two is that the "asterisk" line
doesn't contain the product number that I'd entered - but the rest of the
data is repeated.
When I tab out of the last text box on the first record, a "LostFocus"
procedure saves the record I've just left and goes to the next record. On
the screen, the line I'd been entering now has a blank record selector, the
line originally carrying the asterisk now has a right-pointing arrow (it's
been saved), but still no product number (though the invoice lines table does
have that product number).
If I then click in the first record (the one I entered originally), its
record selector changes to the right-arrow symbol, and the second record
(still showing the copy of what I entered but without the product number)
gets its asterisk back. I click in that second record to change it to a new
product, the first one reverts to a pencil and the focus goes to the next
field in that first record.
In short, I can't get beyond entering one record, and I'm becoming
exceedingly frustrated ... so what am I doing wrong? It must be simple, I've
probably been looking at it for hours and not recognised it.
Brian.