Recent content by Wiz47

  1. Wiz47

    Is it possible to have one form but different SQLs to load data?

    Could he use a combo box and have the recordsource selected at that time? I use this method to create different reports using the same report form. For example 30, 60, and 90 day queries of the data. I use the combo in the form, then have the report read it from the combo and load it in the...
  2. Wiz47

    Capture record count in detail section of report

    This is what it was used for. A Db that tracked daily food intake and produced a report for the doctor. My friend thanks you, and I do too.
  3. Wiz47

    Capture record count in detail section of report

    Update: It *is* working now. Thanks for the assistance.
  4. Wiz47

    Capture record count in detail section of report

    AnswerTotal is a field (Long Integer) in the recordsource for the report. I don't understand why it's not working either. I might create a new Db, then copy the forms, tables, and fields over to see if that's the issue.
  5. Wiz47

    Capture record count in detail section of report

    Okay, I worked through the other issue. It was a word mis-spelled in the sub (lntAsnwerTotal). Now I get the error: "Method or data member not found (RecordSetClone)." Do I need to update my library reference? The good news, I think we're getting closer to a solution here. :)
  6. Wiz47

    Capture record count in detail section of report

    Private sub Report_load() Dim lngAnswerTotal As Long Dim lngCount As Long Dim rs As Dao.Recordset Set rs = Me.RecordsetClone With rs If Not (.BOF And .EOF) Then .MoveFirst While Not .Eof lngAnswerTotal = lntAsnwerTotal + NZ(!AnswerTotal, 0) lngCcount = lngCount + 1 .MoveNext Wend rs.Close set...
  7. Wiz47

    Capture record count in detail section of report

    I'm still getting an #error when it runs: =Sum([AnswerTotal]) / Count(*) AnswerTotal is a long integer.
  8. Wiz47

    Capture record count in detail section of report

    I need to average a set of values in a report based on the number of records displayed. That number will change depending on the report parameters. I plan to use a statement like the following: Textbox Name "TotalCount" =sum([myfield]) / Sum([RecordCount]) Then reference that in the footer...
  9. Wiz47

    Update Form Values

    That's true, good point.
  10. Wiz47

    Need Help

    Where tbl_Main.Date_received Between Forms!frmsearch!txtstart_Date And Forms!frmSearch!txtEnd_Date Something like this would work. Use your own form and control names. Then you could search the table using a query.
  11. Wiz47

    Variables not recognized

    That was it. Galaxiom provided a bit of code that solved the problem. I used it to create a subroutine that accepted both as arguments. Now, I'm going to look through my code and see what else is repetitive and use that method on them as well.
  12. Wiz47

    Variables not recognized

    Worked like a charm, thanks. I was told when I first started programming to separate out terms with an underscore. Old habits are hard to die, but I will make adjustments in the future so the program doesn't get confused.
  13. Wiz47

    Update Form Values

    I generally run it as: If me.dirty then Me.dirty = false End if The only difference is it checks to see if the record has been saved before saving it again.
  14. Wiz47

    As I enter Search Name Show Results?

    Here's a program that I found, then greatly expanded on years ago. It might be what you need. I use it as my personal Rolodex. With it, you can search in real time in any field. So, it's just not limited to the name. For example, if you have a phone number, but no name to go with it, just...
  15. Wiz47

    Variables not recognized

    Yes, here is the pared down version. Hope it is sufficient for your use. The full blown Db does a lot of things, but this is the particular form I need help with.
Top Bottom