Search results

  1. S

    VBA 2007 to 2010 conversion issue

    I had this code working in Access 2007 to create emails from Outlook and populate them. THere had bee nan upgrade to 2010 and now I'm getting a run-time error 13 (type mismathc) on the line to Set NewDoc.... Any ideas? I can't figure this out. thanks in advance Private Sub SendEmail_Click()...
  2. S

    Query using And/Or variable from form

    I have a search form where users select criteria, which runs the query. e.g. Will return results of location 1 and location 2. I want to make the And a variable so that the query can search either the above or location 1 OR location 2. I have tried replacing the And in the query with the from...
  3. S

    SQL Challenge Update, Inner Join, Set, Where

    I have a form with a checkbox. If the box is checked I want a table updated. I have the below query, which works but I want to add a where clause and cant figure out where it fits it. Can someone please help with structure. Private Sub RCSSub_AfterUpdate() Dim dbs As Database Dim qdf As...
  4. S

    Importing from an Outlook secondary mailbox

    I am importing emails into Access from Outlook and am having trouble defining the correct mailbox. I have 2 inboxes, I can import from my default one but do not know the code for my 2nd mailbox. I can accomplish this with a .pickfolder command but wish to automate it. I have the below code but...
  5. S

    Saving an outlook attachment

    Hi, The below code is intended to: 1. open outlook mail; 2. copy the email details into the database; 3. save the attachment into a E: drive location; 4. move the email to another folder. 1,2 and 4 were working fine until I tries to save the attachment and got stuck on the SaveAs line. Any...
  6. S

    Importing table data from outlook

    Hi, I've got the following code to import email information from outlook into the database, however I'm getting the error: "The connection cannot be used to perform this operation. it is either closed or or invalid in this context" I'm using Access 2007 with references: VB for applications...
  7. S

    SQL Where statement from fields

    Hi, I'm having trouble with using a where statement linked to fields when the field is empty. I need a way to say if field is null then 'do nothing'/'select all' else use the text from the box. I have a form (ServicesRCSSearch) which has 3 combo boxes (Location1, Location2 and Location3)...
  8. S

    Using Variables in VBA SQL

    I'm trying to add a variables into the below SQL to make up a field but can't work out how to do it. Variable3 needs to be the field made up of text from Variable1 and Variable2. Variable1 and Variable2 come from Combo boxes where Variable1 will be the Table name and Variable2 will be the...
Top Bottom