Search results

  1. G

    Changing text color in unbound text box

    Right-click on the text box and select 'Conditional Formatting...'
  2. G

    Normalisation Help

    You are talking about data redundancy here. It is always recommendable to keep redundancy as little as possible, i.e. eliminate repeating data by referencing a separate look-up table. For example, in your main table the Season will have repeating data and to store the full season properties in...
  3. G

    Check if function or sub exists

    Hi there, The following code will check whether a given procedure, function or sub exists in one of your VB projects modules: Required reference: -Microsoft Visual Basic for Applications Extensibility Function ProcedureExists(ProcedureName As String) As Boolean Dim m As Module, mo As...
  4. G

    Active X progress bar

    Sorry for bumping this rather old topic, but I finally found a solution to this problem, so I figured, let's share! To adjust values of an ActiveX-control you can do the following (e.g. a progress bar): pbProgress.Value = 0 pbProgress.Object.Min = 0 pbProgress.Object.Max = 10 pbProgress.Value...
  5. G

    parent/child - subforms

    That certainly is possible! Create a form where you display the transaction_gifts table and make sure only the colour of the gifts can be edited. Right now you display the table directly (and linked correctly), but you want to display it only for the given ID and to restrict the user of editing...
  6. G

    Does a sub-report automatically take the same parameters as the report that calls it?

    Are the rowsources of your main form and subform properly set? And if so, can you post the queries or give some info about the tables? What probably is missing are two fields which can be connected.
  7. G

    A field in report shows a blank instead of zero

    Please encapsulate your SQL-code in code tags: [ code] and [ /code] (without spaces). This makes it easier to read. I changed little bit to your query code: SELECT Count([Client Information].County) AS Transylvania, Nz(Sum([Client Information].[#HouseholdMembers]),0)) AS [Transylvania#] FROM...
  8. G

    Comparing the rows of two queries with NULL values

    You are using OR in the WHERE statement of your TableBuster query. Now if any of these substatements is true, then the row is included in the results and that, if I understand you correctly, is not what you want. Thus, instead use this: SELECT [0_TablesCells].TABLE_NAME...
  9. G

    SELECT DISTINCT and COUNT DISTINCT

    Glad to help. The query is indeed not displaying which customers, but the number of unique customers per product group. Thus exactly what you wanted. My bad. :)
  10. G

    SELECT DISTINCT and COUNT DISTINCT

    Try this: SELECT Productgroup, COUNT(UniqCN) AS Total FROM (SELECT DISTINCT(CustomerName) AS UniqCN, ProductGroup FROM SalesData LEFT JOIN ProdsToGroups ON [SalesData].[ProdCode] = [ProdsToGroups].[ProductCode] GROUP BY ProductGroup, CustomerName) GROUP BY ProductgroupSince we only want to...
  11. G

    Parsing XML in VBA

    It should be: Dim rsAttributes As MSXML2.IXMLDOMNamedNodeMap
  12. G

    Does a sub-report automatically take the same parameters as the report that calls it?

    Select the box containing the subform and set the values for Link Master fields and Link Child fields in the Data properties tab. These will be linked and have the same data limit (regarding the link field(s)) since the subform depends on the input of the parent form, even if the row source for...
  13. G

    A field in report shows a blank instead of zero

    You need to give some more information. The query you use would be useful and the field types of the field you are selecting in this query as well.
  14. G

    SELECT DISTINCT and COUNT DISTINCT

    Forgot that one in my first attempt. Check the code in my post again and it should work. :) Just for your information: the error arises because in general all fields you select which are not used in an aggregate function should be grouped. In your query the 'Customername' field wasn't.
  15. G

    parent/child - subforms

    You are going into the right direction. But: check the relationships of your database: transactions.id should not be connected to gifts.id, but to transaction_gifts.T_id instead. As for your second question, just add a transaction_gifts row for each type of gift and color for each transaction...
  16. G

    SELECT DISTINCT and COUNT DISTINCT

    Try this: SELECT CustomerName, ProdCode, SUM(Qty) FROM SalesData LEFT JOIN ProdsToGroups ON [SalesData].[ProdCode] = [ProdsToGroups].[ProdCode] GROUP BY CustomerName, ProductGroup This will count all product codes even if there is no match in the product group table. I haven't tested this...
  17. G

    Display the corresponding 'unbound' column entry of a combobox

    If you want to display the second column in the combo box after selection, set the following properties to the combo box: In Data: Make sure the correct columns are used as row source (e.g. 'ID' and 'Name', in that order) Set Bound Column to '1' In Format: Set Column Count to '2' Set...
Back
Top Bottom