Re: Help-How to retreive multiple records from 1 subform to another subform?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi John,
Thanks for replying! After I worked it out for quite some time, I
managed to do it. Your suggestion actually helped me.

Thanks!
Ramona

John Vinson wrote:
On 26 Jul 2006 13:30:03 -0700, "Ramona" <ramona.sidharta@xxxxxxxxx>
wrote:

Hi there,
Im wondering if anybody could help me on this. I have 1 subform
(EditTarget) and 2 nested subforms (EditOrderDetails and
EditProductSubform)within 1 Main Form (EditCustomer). In EditTarget
subform, I have records of "ProductName" along with its
"TargetCapacity" that is associated with each Customers (1-M
relationship). What I would like to do is to somehow retrieve the
"ProductName" records linked to customers into a textbox called
"ProductID" in EditProductSubform. Thus, when I open the EditCustomer
Main Form, it will automatically fill the "ProductID" textbox with
multiple records in Detail sections of EditProductSubform.
I tried to do it by using Dlookup but it only gives me the first value.

I guess, thats because Dlookup will only return single value. Thus, I m
trying to use Recordset. However, my code currently is not working.

Your basic error is assuming that data is stored in Subforms or in
Textboxes. It isn't. It's stored in tables; the form is only a window,
a tool to let you view data.

If - and I REALLY have to question the validty of this entire
operation!!! - you want to copy multiple detail records, an Append
query into the table upon which the Product Subform is based would be
the appropriate technique.

John W. Vinson[MVP]

.



Relevant Pages

  • Re: Help-How to retreive multiple records from 1 subform to another subform?
    ... Your suggestion about the Append Query actually ... subform, I have records of "ProductName" along with its ... "ProductName" records linked to customers into a textbox called ...
    (microsoft.public.access.forms)
  • Re: Change field of a subfrom while in another subform
    ... John Vinson wrote: ... They're not "in" the Date subform. ... and edit the table field in that way - rather than trying to update ... Quite likely the ReviewDate field should not exist AT ALL, ...
    (microsoft.public.access.forms)
  • Retrieve multiple records using RecordSet
    ... EditProductSubform)within 1 Main Form (EditCustomer). ... In EditTarget ... subform, I have records of "ProductName" along with its ... "ProductName" records linked to customers into a textbox called ...
    (microsoft.public.access.forms)
  • Help-How to retreive multiple records from 1 subform to another subform?
    ... EditProductSubform)within 1 Main Form (EditCustomer). ... In EditTarget ... subform, I have records of "ProductName" along with its ... "ProductName" records linked to customers into a textbox called ...
    (microsoft.public.access.forms)
  • Re: Re-assigning links from subform to form
    ... John Vinson wrote: ... contacts subform is now showing the multiple contacts per company. ... the master form is still showing all 268 records - not just ... It sounds like your mainform is ...
    (microsoft.public.access.formscoding)