Recent content by Stew

  1. S

    Dcount problem

    Give the following a try: "[Gender] = 'Male' and [Ethnic group] = 'Black' Or [Gender] = 'Male' and [Ethnic group] = 'Asian'") Paul
  2. S

    Can you hide a label when field not in use???

    There are, of course, other ways (and maybe simpler) but I use a text box instead of a label and set the control source of the text box to something like the following: =IIf(IsNull([cont_id])," ","Concentrator ID") It checks the [cont_id] field for a value, if it is null then it sets the value...
  3. S

    Using =Date()

    Hey Mike, If you could post the SQL string/code you are using, it might help give us a better idea of what is going on. Maybe it's just something in the syntax. Paul
  4. S

    Logging when a report has been printed

    If you plan on tracking when all reports are printed and how many times, I suggest creating a seperate table to do so. You can place the name of the report, the date is was printed and even who printed it into this table. Paul
  5. S

    SwitchBoard

    Hey Newman, I like to think of a switchboard (unless I've gone astray) as similar to the start page of a web site. It's a form that the user starts with so he/she can go to various sections of the database. Paul
  6. S

    Multiple Records

    You can re-design the form and have the results show up in rows by setting the Default View in the form's properties from Single form to Continuous forms or Datasheet. You may have to adjust the size of the Details section in the form. Hope this is the direction you were thinking about. Paul
  7. S

    Calculation Trouble

    It does indeed make sense and DSum should do the trick for you as long as you can refernece the poolID. If the relationships between your tables are correct then you can include the poolID as part of the query for the subform (place the field on the subform if you like and hide it if you don't...
  8. S

    Direct to folder

    Something like the following should do the trick: cmd_button.HyperlinkAddress = "C:\Client Information\documents\" Paul
  9. S

    Calculation Trouble

    I suggest troubleshooting by breaking your calculation into two fields (DLookup in one, DSum in the other) and seeing if the numbers that result are correct, then doing the subtraction based on the two fields. It might help isolate where the problem is located. Paul
  10. S

    Quick DLookup question

    I know exactly what you mean, I've stared at code for hours trying to figure out why it wasn't working only to discover that I misspelled a field name or referenced a wrong field. So goes life in the trenches of the code war (kind of funny). Have a good one. Paul
  11. S

    Quick DLookup question

    I'm not quite sure if I understand what you want to do, I would just add one extra line to set the value for FreightAllowance: Private Sub Distributor_AfterUpdate() On Error GoTo Err_Distributor_AfterUpdate Dim strFilter As String ' Evaluate filter before it's passed to DLookup function...
  12. S

    Text File Summaries

    No, I don't think you can use them on unbound fields. I use the DSUM and other D functions with the same queries that I use to generate my report to do such calculations. DSum("[AMOUNT]","qry_comp_amt_sub","[COMP_ID] = '" & [COMP_ID] & "' AND [client_id] = " & [client_id]) The DSUM function...
  13. S

    Call another's form procedure...

    I understand where you are coming from but writing a function and placing it in the module may still be something to consider instead of creating similar subs on a bunch of forms. I often make my own buttons (for example, to move to the next record, previous record, etc.) and place the code in a...
  14. S

    Call another's form procedure...

    If the possibility exists that you will continue to use this procedure on other forms, perhaps you should consider placing it in a module so you can call it from anywhere in the database. Paul
  15. S

    multiple calculations in footer

    Oops, may need another "&" ="Total for " & [Consultant] & ":" & Sum([GrantAmount]) & " " & Sum([ConsultantFee])
Back
Top Bottom