datasheet - subforms

R

Robbie

Hi I have two datasheets in a form the first datasheet has 3 records on with
container delivery dates,

the second datasheet has all the product listed inside the containers what i
want to do is to click on the first datasheet only the product for the
container listed is viewed,
datasheet 1
record 1 delivery 18/09
record 2 delivery 19/09
record 3 delivery 20/09

datasheet 2
record 1 lamb legs 56 ctns
record 1 lamb chumps 100 ctns
record 2 lamb legs 100 ctns
record 2 lamb chumps 50 ctns
record 3 lamb loin 100 ctns
record 3 lamb shoulder 100 ctns

to this: when selecting record 1
datasheet 1
record 1 delivery 18/09
record 2 delivery 19/09
record 3 delivery 20/09

datasheet 2
record 1 lamb legs 56 ctns
record 1 lamb chumps 100 ctns
 
W

Wayne-I-M

Hi Robbie

One method would be to create the 2nd Datasheet on a popform.
You can then click the 1st datasheet record selector (the small square on
the left of the record) and open the 2nd datasheet with just the information
your need shown.

You would need something (a field based control) on both datasheets (unless
you filter using a query)

The OnClick event of the 1st Datasheet would be something like

Private Sub Form_Click()
DoCmd.OpenForm "2ndDatasheet", acNormal, "",
"[ID]=[Forms]![1stDataSheet]![ID]", , acNormal
End Sub

In this case you would need a form called ID on both forms.

Good luck
 
W

Wayne-I-M

ooops - just re read your post.

Instead of pointing to the ID, you would need to use a the date range.
something like
[DateControl] >#date# AND <#AnOtherDate
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top