Search results

  1. C

    Automatically Email using Win2PDf

    .pdf isn't a native OutputTo format for reports until Access 2007 (which is the reason for the 3rd party Win2PDF), but without knowing how Win2PDF saves the PDF it's hard to say how to remove the prompt. I've never used Win2PDF.
  2. C

    How to search multiple values in the database using a command button

    If Len(strfilter) > 0 Then strfilter = Left(strfilter, Len(strfilter) - 5) End If Me.Filter = strfilter Me.FilterOn = True Me.ReQuery
  3. C

    Using IIF & Like statements in query

    Never heard of it, sorry.
  4. C

    Set up alert mail

    The Access function is the one you would call, that in turn calls the Outlook function. You would call it like this: SendEmail("CBrighton@email.com","Test Subject","This is the message body","c:\Attachment.doc") The attachemnt and the 2 remaining variables which I skipped (CC & BCC) are...
  5. C

    Using IIF & Like statements in query

    How I wish I had a single role. :) Due to a series of mergers giving me a selection of legacy data sources I have access to a few data warehouses, Oracle databases, SQL servers, Access 97 databases, Access 2003 databases, Acces 2007 databases, and various other data sources which I shouldn't...
  6. C

    Using IIF & Like statements in query

    My only real suggestion would be to try to learn multiple database platforms (i.e. SQL server, Oracle, etc) as well as Access. All companies need to store data, the more platforms you know the more companies woule find you useful.
  7. C

    Using IIF & Like statements in query

    Maybe I should just delete all the documentation in my existing code and quit now :D Regardless, I can certainly understand trying new ways to do something. Being self taught I spend quite a bit of time finding out the best way to do things. :)
  8. C

    How to search multiple values in the database using a command button

    Looks good, you just need to add it to the form's .filter property now and ensure the filter is enabled. That's done something like this: Me.Filter = strFilter Me.FilterOn = True You may need Me.Requery or Me.Refresh too, but I'd try without it first.
  9. C

    Using IIF & Like statements in query

    Fair enough. I tend to favour simplicity, mainly because at some point someone else is going to need to understand my code (whether it's because I'm unavailable or no longer work here), and going for methods which are hard to find documentation for online could cause big headaches down the...
  10. C

    Using IIF & Like statements in query

    Sounds like a lot of hassle to save having a single line of VBA in each control calling the function. I think I'd add a command button to run the function myself, that way once the user has set the required criteria they can apply it with a click of a button. Unless there is some reason that...
  11. C

    How to search multiple values in the database using a command button

    How are you planning on displaying the records, are you planning on opening a form or a report, perhaps displaying a qwuery directly to the end user? Personally the way I'd do this is by constructing a string in VBA based on the values of the controls you mentioned, then apply that string as...
  12. C

    Using IIF & Like statements in query

    You could try the forms after update event, but I'm not sure if that fires as soon as a control is updated or as soon as the recordset is updated (i.e. the changes saved). I know that I use the event for my audit logs to record any changes to any control on the form, but I'm not sure at which...
  13. C

    Password protect a form

    Take the code out of Form Open and put it into the On Click event of the command button which opens the form which you want to protect. Then move the current "DoCmd.OpenForm" which the command button does to where the "MsgBox "Access granted."" is in the above code, that way the form will only...
  14. C

    Question Need to build a database ?

    Generally speaking you want each table for each "thing" which you will record data about. For example you could have a companies table with the company data, an address table which holds various billing / shipping addresses for each company, a services table detailing what services you offer...
  15. C

    Getting error 3021 when trying to retrive data from record set

    I stand corrected then. Thanks for clearing that up. :)
  16. C

    Automatically emailing a Access report once a week

    Which application? If you mean Access then add Quit to the end of the macro (or DoCmd.Quitafter the loop if you are calling it via VBA rather than a macro).
  17. C

    Using IIF & Like statements in query

    I'm not sure, but you may not be able to do this purely via SQL / query builder. I have recently been updatingvarious query criteria, and in any instance where I use an Iif statement I have had to use it around the values themselves. e.g. the following did not work...
  18. C

    Getting error 3021 when trying to retrive data from record set

    Not sure if this is sorted now but if not you haven't specified whether you move into a record before using the field. When opening it you will be @ FS.BOF, not the first record. FS.MoveFirst will bring you to the first record.
  19. C

    Automatically emailing a Access report once a week

    Did you sign the code in outlook then close & reopen (and click enable macros on outlook)? Here's the MS site for that error: http://support.microsoft.com/kb/931407
  20. C

    Set up alert mail

    :Edit: The following post assumes Outlook is the email client in use To have it fully automated you will need to add a module to both Access & Outlook, sign the code in Outlook, and use the Access function to call the Outlook function to send an email if a query returns 1 or more records...
Back
Top Bottom