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

subform data not coming up correctly

Status
Not open for further replies.

WebGuyToo

Programmer
Aug 18, 2004
124
US
Happy Holdiays all,

I'm working with a MS Access 2002 (2000 file format) application and having a problem with my subform. I create a query that Selects the top 10 records from a table in desc order to get to the latest 10 records. The query works great. I created a form with the source being the query. This is my subform and it works fine. My problem comes in when I put my subform on my main form. I have linked the forms correctly. When I run the form on the field thats link have data (memberID). The rest of the fields dont have any data.

Does anyone know what could be causing this? Thank you.
 
I'm sorry but I'm at my first job and dont have access to to it. There isnt any code accociated with it. Its just queries and forms. Would you have any ideas why that would only returns values for the field that links the two forms?
 
There could be a number of reasons. Perhaps the best bet would be to create a subform on the main form using the wizard, that is, make sure that the wizard icon on the toolbar is clicked. The wizard should step you through getting the right information from the query. You may also wish to look at the Northwind sample database for examples of forms and subforms. Note the Link Child and Link Master fields.
 
I have looked at several examples and they seem to be the same. Is it ok to have a query that has order by and top 10 in it used in a subform? I'm wondering if thats the problem. If I use a table that I query from it works just fine. If I use the table is the a way to sort or filter descending it and select the top 10 records?

Thanks for your help.
 
sorry, let me make this a little more clear.

If I just use the table it works fine. Is there a way to just use the table and sort or filter desc and select only the top 10 records?
 
it sounds like you haven't established a relationship between the data sources. Make sure your related data have relationships.
 
How are ya WebGuyToo . . .
WebGuyToo said:
[blue] I have linked the forms correctly. When I run the form on the field thats link have data (memberID). [purple]The rest of the fields dont have any data.[/purple][/blue]
Are the recordsources of the mainform & subform based on tables with a relationship of the same linked fields on the form?

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top