Help on strange form behaviour needed

Markvand

Registered User.
Local time
Today, 11:40
Joined
Jul 13, 2004
Messages
88
G'Day all,

This problem really bothers me, so please somobody help,

Here is what I have:

I have a main form with combo:

SELECT TblProducts.ProductID, TblProducts.ProductName FROM TblProducts ORDER BY ProductName;


Subform is joined with main one with ProductID field. Subform is a continous one linked to a query:

SELECT TblBOM.ProductID, TblMaterials.MaterialID, TblMaterials.Name, TblMaterials.Vendor, TblMaterials.Producer, TblMaterialys.Group, TblMaterials.PE, IIf([price] Is Not Null,[price],[O_cu]+([Cu_Weight]*[DEL]/100)) AS Price2, TblMaterials.Curr, TAB_Materials.Menge, CCur(IIf([Price2] Is Null,"Price check",[Price2]*[exrate]/[PE])) AS PRISE, TblMaterials.date_start, TblMaterials.date_end
FROM tblFFDel, (TblCurr INNER JOIN TblMaterials ON TblCurr.Curr = TblMaterials.Curr) INNER JOIN TblBOM ON TblMaterials.MaterialID = TblBOM.MaterialID
WHERE (((TblBOM.ProductID)=[Forms]![FOR_Control]![Indeks]))
ORDER BY TblMaterials.MaterialID;

Here are the table structures I have

TblMaterials
MaterialID text (pk)
Name text
Vendor text
Producer text
Group number (SELECT TblMaterialGroup.GroupID, TblMaterialGroup.groupname FROM TblMaterialGroup ORDER BY [groupname]; Columncount 2, columnwidth 0cm;3cm)


TblMaterialGroup

GroupID autonumber (pk)
Groupname text

Everything works fine, I can pick the index from combo and get the list on the subform, the only problem is that I am getting number in the fields: Group, Vendor, Producer instead of names. The thing is that, in the querry there are all names.

Any suggestions?

Cheers

Mark
 
Mark,

The RowSource for your combo is "Select ProductID, ProductName ..."
When you want to reference the ProductName, it is done by:

Me.Combo.Column(1) <-- The subscripts start at 0

Look at the properties for the combo:

width = 0";1" <-- That's why you don't see the number on the combo
# Columns = 2 <-- ProductID, ProductName
bound column = 1 <-- Bind it to ProductID

Wayne
 
Wayne,

Thanks for your reply, I'm not sure if I'm getting this correctly, there is no problem with the combo. The problem is in the subform where I have a text fields related to a querry.

ProductId, Product name are display correctly, in the other fields instead of names I'm getting numbers.

Sorry, if I misunderstood your post.

Regards

Mark
 

Users who are viewing this thread

Back
Top Bottom