Search results

  1. C

    Pass 2 different Search Options to same Report

    You seem to have missed this: What it nmay be worth doing is using this line of code... MsgBox Option3 ...to make sure the control is outputting the number you expect for each selection.
  2. C

    Pass 2 different Search Options to same Report

    The problem with self / community taught is that sometimes you pick up enough to think you know what you're doing. I do it all the time. ;)
  3. C

    How do I use a form value in a query expression

    Change it to: CInt([Forms]![Payment Form for Contacts]![InvoiceIDX]) I assume that character is number 2463 in some character set, converting it to an integer will cause it to display correctly in the query.
  4. C

    Pass 2 different Search Options to same Report

    What's the On_Focus for? Isn't "Select Case Option3" enough? I did a quick google for "Select Case On_Focus" and I don't see anything which would explain why it's needed. Try it without it.
  5. C

    How do I use a form value in a query expression

    Sorry, can you save it as an .mdb please? I only have Access 2003 on this PC. :)
  6. C

    Pass 2 different Search Options to same Report

    I've not looked at the example database (not on my Office 2007 machine so accdb is a no-no) but I can see a few things I would flag up in that code. Select Case Me.Option3 = On_Focus Should this have the " = On_Focus"? I use if statements over case so am not 100% on the syntax, but I would...
  7. C

    How do I use a form value in a query expression

    I think we may be at the point where a sample database would be useful. Can you import the form and query (and a table with a dummy record or 2) into a new .mdb and attach it?
  8. C

    How to verify Field Value exist?

    Removing the Not from my code is all you need then (other than changing the control names to match yours). The first If statement is checking for null / zero length in txtWOno. If it's not longer than 1 character after catching the nulls then display messagebox and exit. The second If...
  9. C

    How do I use a form value in a query expression

    Sorry, msgbox was VBA code rather than something to go into the query. Create a control button and use the VBA editor to create the on click event. Then just paste the code I provided in (and replace the FormName & ControlName placeholders with the real form & control name). When you click...
  10. C

    Keep Query from Running?

    As long as you are using the same query (or SQL copied from it) then that shouldn't make a difference. Unless you have these parameters set in the query properties but not actually used as criteira. In which case either copying the SQL or deleting the parameters will resolve it.
  11. C

    How to verify Field Value exist?

    You will want to account for both null and a zero length string. Try something like this (change control names as required): If Len(Nz([txtWO],"")) = 0 then msgbox "Not valid WO number" Exit Sub Else If Not [txtAmountPaid] > 0 then MsgBox "WO has been paid" Exit Sub...
  12. C

    How do I use a form value in a query expression

    What do you see if you do the following, the data you expect or the strange character? MsgBox [Forms]![FormName]![ControlName]
  13. C

    Keep Query from Running?

    If the query used as the record source no linger needs these criteria then remove it from the query. Or create a second copy of the query without those criteria for use in this form (that way the query continues to work the same in any other functions it may have).
  14. C

    How do I use a form value in a query expression

    I assume the form is open and the control has something populated in it before you run the query?
  15. C

    How do I use a form value in a query expression

    Try this: [Forms]![FormName]![ControlName]
  16. C

    Automatically emailing a Access report once a week

    The functions required for Outlook email automation are in my post in this thread: http://www.access-programmers.co.uk/forums/showthread.php?t=216409 It involves adding functions to modules of both the access database and Outlook session and also using MS Office's selfcert program to certify...
  17. C

    Automatically emailing a Access report once a week

    You currently have command buttons setup to send the reports, so I assume you have either a macro setup already or have the VBA code to do it. If you have the code you can create a new VBA module, create a function and copy the code from the command buttons into there. Then the macro can do...
  18. C

    Automatically emailing a Access report once a week

    Create a macro to email all the objects that you need then create a scheduled task in Windows to open the database and run a macro using the /x flag. e.g.msaccess.exe c:\Database.mdb /x mcrEmailReports
  19. C

    Query by months

    The first red part should be replaced with the name of the field you are setting the criteria on (the date/time field). The second and third are supposed to be undefined. The form doesn't have to exist before the query, but it's hard to test it until the form is done. Replace "MainForm" with...
  20. C

    Splitting The Database

    It's possible, yes. You can link as many databases to tables in as many databases as you want (barring any universal limts like database file size, number of objects in a single file, etc). However I would only do it if the data is reported on together. With the limited number or connections...
Back
Top Bottom