missing field data in subform

CHAOSinACT

Registered User.
Local time
Tomorrow, 04:00
Joined
Mar 18, 2009
Messages
235
ok...i have query which brings 2 tables together. works great. go to load as subform and every field displays except 1!!! its there but the records look empty in that field - i open seperately and they are there, just not in subform! any thoughts?
 
ok...i have query which brings 2 tables together. works great. go to load as subform and every field displays except 1!!! its there but the records look empty in that field - i open seperately and they are there, just not in subform! any thoughts?

Have you check the control's source to be sure it is bound th the correct field?
 
Have you check the control's source to be sure it is bound th the correct field?

yeah...it is. since it links to table the ControlSource is BillByType from the query
it comes from a list table so the row source is

SELECT [tblBillingTypeCode].[LineID], [tblBillingTypeCode].[BillType] FROM tblBillingTypeCode;

it all works unless it is in a subform. then everything but that field works, that field looks empty. u can open the sub form and query seperately at same time and they look differtent. i think i've gone nuts....
 
Have you check the control's source to be sure it is bound th the correct field?

yeah...it is. since it links to table the ControlSource is BillByType from the query
it comes from a list table so the row source is

SELECT [tblBillingTypeCode].[LineID], [tblBillingTypeCode].[BillType] FROM tblBillingTypeCode;

it all works unless it is in a subform. then everything but that field works, that field looks empty. u can open the sub form and query seperately at same time and they look differtent. i think i've gone nuts....

How does it look different?

Are you sure the form is using the query as the record source?
 
Is your subform record souce query returning the name of the billing type when it should be returning its ID? Otherwise is the bound column of the combo incorrect? It should be the ID.

If these two things are not matched and you have limit to list enabled then you will get no value showing in the combo.

BTW: Your "field" on the form is actually a "control". (That is why it has a "Control Source" not a "field source"). Fields are in tables and queries.
 
yes all the same query. the field "BillByType" will not display values in subform but in query fine - the field is there in sub form but blank...

query

subform
 
sorry try this...
 

Attachments

  • query.jpg
    query.jpg
    48 KB · Views: 132
  • subform.jpg
    subform.jpg
    49.6 KB · Views: 158
Your query is returning the name rather than the ID which is great for a query. It won't work in the subform.

The subformcontrol Source Object is a form in Datasheet mode. Despite the Datasheet subform looking like a query with fields is actually a Datasheet display of the controls on the form, not the query.

The query is the Record Source for the Source Object of the subformcontrol.

Your query is returning the name while the control on the form is looking for the ID.
 
god how do i fix that now? data in there aready won't that stuff things??? surely there is a way to show the text not lineID?
 
could i get the data in vba and stick it to a bound form? while where on it, what object defines the "current" recordset being used at a given time? i know how to load a recordset but if your working on a subform i assume the current recordset and its current position is already available somewhere? maybe i can extract data from query and push it to control on form?
 
You could change it to record the name field by changing the Bound Column of the control to the Name column (1) of the RowSurce query. However this is a retrograde move.

What is being stored in the table ID or Name? Ideally it should be an ID. If not create another field and update it to show the ID.

Check the control on the form is set to read the ID but show the Name. The Bound Column should be 0 ie the ID field (counting from zero) in the RowSource query. The Column Widths should be set to zero for the first column, something like this: 0cm;5cm

Change the query to return the BillByID instead of (or as well as) the BillByTypeName.
Change the BillByType ControlSource to the name of the ID field in the query.
 
lol not really....

i had the subform by just dragging it onto form. i opened query and added lineID even though not the linked field. then went to subform, deleted the offending fieild in subform and ADDED MANUALLY the lineID AND BillByType, it work.... made line ID col width 0.... got on with my life....LOL

Thanks so much to all! as alwasy
 

Users who are viewing this thread

Back
Top Bottom