
subform not allowing new record
I've also run across this often. The way I've often solved it is, if I only need
one field from a particular table, I make a function in a public module to return
the string (or whatever) value of that field, passing the function the linking
field from the (or one of the two) table(s) in my query. Then, in the text box
where I want that value to appear, I make the datasource = the function (you can
use the Expression Builder to do this).
Hope this helps.
Quote:
-----Original Message-----
The problem is the fact that the subform is based on a
multiple-table query.
Sometimes you can get around this by altering the relationships
among the tables with the query structure. BUT you may have
not use that query - sometimes 2 tables i a query will work, but
not three. (I ran into the same problem on a project about 2 years ago.)
---Phil Szlyk
> I have a from SalesOrders, and an embedded subform lineitems, which
> is based on a multiple table query (tblProducts, tblsalesorders &
> tblLineItems)
> Relationships:
> Products to Lineitems indeterminate, linked by product ID (I think
> it ought to be many-to-many, but don't know how...and Acces won't let
> me anyway<g>)
> SalesOrders to Lineitems one-to-many, linked by orderID.
> The subform will not permit adding new records either in standalone
> or when embedded. I have checked that the properties of the form are
> set to allow edits, additions and date entry, but the record
> navigator new record is still greyed out.
> The preferred view is tabular, but the problem remains even in datasheet
view.
> (And I really thought I'd cracked this stuff when I managed to
> calculate the line value AND sum it in the footer. Sigh...)
> Can anyone tell me what particular newbie error I'm committing, please?
> TIA
> --
> Kim Pavey, Stevenage, England
> the past is only prologue
.