Search results

  1. C

    Sum filtered criteria

    Something like this, maybe: =Sum(Nz(Iif(myDelFlag=vbYes,0,[WEstHours])*[WRate],0))
  2. C

    Query -> Report (help!)

    Why not save the query? Then you can build one, create the report based on it (since you said that the fields stay the same) and even though the query changes, Access will be happy. I do something similar in a system that builds a customized passthrough query. I delete the old version, build...
  3. C

    form based on query

    OK, let's take a different approach... I'd make your two entry fields on the form numeric, with input masks and default values that put months in the range of 1 through 12 and years into some appropriate range. Then, in your query, I would create two new fields. One will be the month only...
  4. C

    form based on query

    Here's one way around this, not elegant but maybe useful. Create a new unbound text field on the form (locked and invisible). Give it a nice name, and a control source like this: =[cmbMonth] & "/" & [cmbYear] Then use this new field as the criteria in your query. Be careful, you may need to...
  5. C

    Macros in query?

    Look up parameter queries in the Access help, and then look up wildcards. You want to create a parameter query that uses wildcards.
  6. C

    Filter a Form on a Field in Subform

    I like a "Show all records" button. The code isn't hard: ' set whatever form fields you want to null, ' makes it obvious to the user that their ' selections were wiped out Me.cboSomefield = Null ' then just do this DoCmd.ShowAllRecords
  7. C

    SQL in VBA

    Not sure I understand you, don't you just want to do: Dim intID as integer . . intID = 3 . . ([PRS Project Details].[Project Ref])= intID
  8. C

    Passing a parameter to a query

    I'm sure that there are cooler ways to do this, but I would put a new field on the form to hold the value that you are currently storing in SQL3. I'd set the visible property for this field to no and the locked property to yes. Then you should be able to pick up the value from the form in your...
  9. C

    Printing error messages

    I haven't done much yet with the error trapping. I put the display code into a separate module, then build the message like this: strMessage = "Automated System Error: " ' Message to send. strMessage = strMessage & Err.Number & " " & Err.Description Now I have another programmer here who will...
  10. C

    Annoying Command Button!!!!

    If you put this code into the "on mouse move" property of a button, it will move the button around three times before it lets the user "catch" it. We have it on some of our "about" screens (those dreary little forms that tell the user who to call when things go bad...we'd like to have 'em...
  11. C

    Printing error messages

    Thanks. It works well (I'm running Windows 2000; "same difference", as my Mom would say...) [This message has been edited by Chris RR (edited 08-17-2001).]
  12. C

    Printing error messages

    I can see where that would work in some circumstances. What I'd really like here is to find some way of directing a message to the standard sysout, so that the error would be visible to the computer room operator (who is not in front of this particular machine.) By the way, email isn't an...
  13. C

    Printing error messages

    I am automating an Access 2000 system and would like to know if there's a way to redirect error messages to a printer (or a file???) Right now I want to have message boxes when I hit an error. But once this is running unattended, I'd like to log the errors (to a file or to print) and shut...
  14. C

    Extremely Difficult Query

    What you need to do is to create a "TopValues" query (look this up in Access help). Get that working, and then build your report on that. 17 or 1700 or 170,000 records, same process.
  15. C

    VB specialists help wanted: Would this code work?

    Are you trying to update all the records in your tables each time a form item changes??? Or do you want to update a single field in a single row? If you answer yes to the first question, then either you are updating some global field, or you have a design problem. If you answer yes to the...
  16. C

    Printing landscape

    In design view for the report, go to File, Page Setup. You can change the orientation on the Page tab. One little quirk of some release levels of Access 2000, though. If you have the Name Autocorrect feature turned on, Access sometimes reverts those nice landscape setting back to portrait...
  17. C

    FIELD LIST NOT UPDATING

    Is the form based on the table, or is it based on a query? If the answer is "query", you'll need to add the field there first.
  18. C

    forms

    I'm make up a report with the same data as the form, and email that.
  19. C

    Subreport Nightmare

    Have you tried the "On No Data" property for the subreport?
  20. C

    Using "OR" in If...Then Statements

    There's another way, but you'd never think to look it up unless you know what it is: If FunctionName() in ("ClarkL","SmithM",ThomasS") then ' do whatever... The magic word is "in". axa's Case logic is also an excellent choice; depends on what you are doing. [This message has been edited by...
Back
Top Bottom