So far I still can not get the zero to display. I am thinking that it has something to do with the way my tables may be set up..... I have a table (My main table) that has a text field called “DetailDesc”. That field is linked to another field “EorDName” on a separate table. The user can add various “EorDName”, so currently there are about 20 different EorDName to choose from on a drop down list. It is these EorDName fields that are being displayed on my listbox that are not showing the last zero. Could that be the cause of the problem?? I noticed that my calculated field (Net Salary) on my query that is not tied to DetailDesc does display the last zero.....
Here is the crosstab query in SQL view:
PARAMETERS [Forms].[ChooseEmply].[ChooseEmployee] Text ( 255 ), [Forms].[ChooseEmply].[ChoosePayrollYear] Text ( 255 );
TRANSFORM CCur(Sum(DataTable.DetailAmt)) AS SumOfDetailAmt
SELECT DataTable.Month, CCur(Sum(DataTable.DetailAmt)) AS [Net Salary]
FROM DataTable
WHERE (((DataTable.EmployeeID)=Forms.ChooseEmply.ChooseE mployee) And ((Right([Month],2)) Like Right(Forms.ChooseEmply.ChoosePayrollYear,2)))
GROUP BY DataTable.Month
PIVOT DataTable.DetailDesc;
Best regards,
Keith.
1. Drop Down List (ComboBox) and List box (ListBox) are 2 different types of controls. Combo allows user to pick one value at a time or enter their own depending on settings. ListBox allows user to pick one or more values depending on settings. I think you are using a drop list (combobox) to display a list of values (EorDName) to pick from or allowing users to enter a value and then filtering or using that value to navigate your records.
2. According to your description of the linking you are doing EorDName is a Text datatype that your users enter into a table.
3. Make a query with your parameters or criteria and then make a crosstab_query based on the parameter query.
4. Is it EorDName from your droplist that is not displaying the correct format or DetailDesc in the crosstab?
5 How are you displaying the results of the crosstab - in a datagrid, listbox, continuous form, etc?
6. How are you using this value when entered or selected?
The rowsource of your combo could be:
SELECT DataTable.DetailDesc
FROM DataTable
Group By DetailDesc
Order By DetailDesc;
This would give the user a unique list of the DetailDesc values in ascending order to pick from without having to maintain another table (If that is the purpose of the table EorDName is stored in).