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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking subform to unbound control

Status
Not open for further replies.

keithgi

Technical User
Feb 1, 2002
20
GB
I am a newbie and getting slightly bewildered. I've set up a small database for our office and have a main form in which users can enter search criteria in text boxes which then uses a select statement (based/copied from MS Solutions) to show results in a subform. I want to be able to then click on a record in the subform dataset and have a second subform show a list of related records from a related table. I cannot set link master/child fields as it keeps saying 'cannot link unbound objects'. I presume this is because none of the text boxes are bound directly to a table. I have created an invisible box which shows the ID/Ref of the selected record, and need to use this to find the related info for the second subform.

How do I do this please. The simpler the explanation the better thanks!
 
Hello,
I once had the same problem. I eventually figured out the solution.
Let me start by asking a few questions.

1. Is there more than one search criteria?
2. Do you want the data to be shown in a subform as they search for it?
3. Are you falmiliar with queries?

My form has a 5 case search engine. It allows the user to search using a wildcard and the results are displayed on the form in a subform. Records can then be selected in the subform and then more can be done to them as the user chooses.

If you want me to take a look at what you have email me a rough copy of your Database.

kenneth.sanders@wsbahq.com

This is actually pretty simple.

Kenny
 
Thanks for your reply.
I have actually managed to solve my problem by using an 'on click' event for one of the fields in the 'results' subform which then shows related data in the second subform using a query based on that records ID Ref.

Strangely I couldn't get this to work using the 'on change' event when my 'invisible' box got updated (its contents changed to show the ID ref of whichever record in the subform which had the focus). It didn't seem to register this as a change. Not that it really matters now, but have you any ideas why.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top