Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a subform to select records in another - linking problem?

Status
Not open for further replies.

gemoon

Programmer
Mar 22, 2002
55
US
I am trying create a from with the design suggested by willir in thread702-894117.

I have two subforms. one displays a list of dates. the second displays information for a specific date. sfrmDate has several nested subforms.

sfrmDateList sfrmDate
+----------+ +----------------------+
|01-Jan-04 | |15-Jan-04 |
|15-Jan-04X| <-Select |Replica #2 |
|02-Feb-04 | |bla bla bla bla bla|
+----------+ +----------------------+

The problem i am having is that the second subform does not respond to changing the record selection in sfrmDateList. ie sfrmDate remains stuck on the first date.

sfrmDateList is based on a tblDate which as Date and DateID fields. the linkage in sfrmDate as follows
Link Child Fields: DateID
Link Master Fields: [sfrmDateList].Form![DateID]

i tried using tblDate as the record source for the main form. then i linked sfrmDateList to the main form via DateID for both master and child field. this partially worked except only one date was displayed in sfrmDateList.

thanks for any advice.
Ed.

 
Hallo,

Not sure what's wrong with your current code, but you could do it via a linking control on the main form:
Create a Text box on the main form and use it as the master control in sfrmDate.
In sfrmDateList Form OnCurrent event update the Text Box of the parent with the dateId

Alternatively, why not use a list box instead of sfrmDateList. I like list boxes as they highlight the whole selected entry, which is clearer, IMHO,

- Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top