Search results

  1. S

    .Attachments in visual basic

    It still gives me a runtime error, any other suggestions?
  2. S

    .Attachments in visual basic

    I have some code that sets up some emails from Access to Outlook, but I want to add an attachment to each email. I have this code below and it works, the only problem is the new line that I have put in: .Attachments = "P:\... It causes a run time error and I can't work out why, any ideas? Sub...
  3. S

    Opening a fabricated query from VB

    What I'm actually trying to do is export the queries to html or excel, I wanted to loop through a list of names and filter a query on each name then export it to html or excel. So if I had 22 names I would be exporting 22 tables. I've got this piece of code: DoCmd.OutputTo acOutputQuery...
  4. S

    Opening a fabricated query from VB

    I am trying to make a more complicated piece of code than this, but I have started to break it down and I think if I can get this bit to work I can sort out the rest. Basically I want the code below to work but it is getting snagged on the DoCmd.OpenQuery rst1 bit, it seems to be fine with the...
  5. S

    VB code to create and export several queries

    Hi, I am having trouble finishing off some code that should step through one query and fiter another query by each record, exporting them each time to excel. This is the code below, basically it open a query containing just Owner names, takes the first one and filters another query on it, sets...
  6. S

    button on a subform to lookup a record in mainform

    So Close! Ok so I'm trying to do the call but something isn't working: in my subform I have this code: Public Sub Command1_Click() Dim Donna As String Donna = Me![obs number] Call LookAdipose End Sub and in my main form I have this code: Public Sub LookAdipose(Doctor)...
  7. S

    button on a subform to lookup a record in mainform

    Any Help? Someone must have an idea of how to do this, I feel like I am close to working it out but I'm just missing a step. Any ideas are welcome?
  8. S

    button on a subform to lookup a record in mainform

    Basically I want to jump to a record on a mainform by clicking a button on a subform within the mainform: I have a form which shows records and within each record there are several sub-records, to help me jump straight to a certain sub-record I have put a subform down the side that is linked to...
  9. S

    update query problem

    Resolved I have sorted out the problem now, don't know if it was the most conventional solution but I found that if I got rid of all non essential fields in the non-updateable query just leaving 2 then the update query worked. I have no idea why that works but it does so I'm not going to worry...
  10. S

    update query problem

    Hi, I have an update query to update some data in a table, however I am using another query to filter out the items to update, I have brought the query into the update query and linked the field that will filter the records but because the filtering query uses a sum it is non-updateable which...
  11. S

    Code keeps snagging on nulls!

    Hi I've got this piece of code in a procedure for calculating IRRs from a table of data and at first it was snagging when it came to a null value, so I put in an if to tell it to take a zero if the field is null, but it still seems to snag on it, when I look in the code it has set it to zero but...
  12. S

    simple itterative loop + something a bit harder

    I have 2 problems, I need to set up an itterative loop that does these calculations: Values(0) = rec.Fields("0") Values(1) = rec.Fields("1") Values(2) = rec.Fields("2") Values(3) = rec.Fields("3") Values(4) = rec.Fields("4") Values(5) = rec.Fields("5") Values(6) = rec.Fields("6") Values(7) =...
  13. S

    IRR Calculations

    IRR Calc - can no one help me with this? please can someone help me with this, I'm sure I just need some kind of itteration formula or something but I don't know how to do it:confused:
  14. S

    IRR Calculations

    I want the IRRs to be put into a table next to the Ref numbers, the flat file looks like this: Ref SchedDate SchedAmount 1111 10/04/06 102000 1111 10/04/07 -80000 1111 10/04/08 -80000 1111 10/04/09 -107000 1112...
  15. S

    IRR Calculations

    Hi, I need to add in a function to a database that calculates IRR for each of many reference numbers, everything is in flat file at the moment but I can get around that to list cashflows in rows for each ref if I have to. I found a thread where someone wrote some VB to do this for a set or refs...
  16. S

    Quite simple question

    I have created a query with simulated fields created to be appended to a table. However the table has an autonumber field and I need to simulate the next autonumbers in the query to append into the table. All I need is a simulated field that starts at 1 and increments up for each record, I can...
  17. S

    Paste to Outlook Calendar

    Just need an external paste function Hi, What I've got is a personal folder in my outlook called 001LeaveCal, which contains a calendar called 001LeaveCalendar. I've tried lots of codes which try to use the pathname "001LeaveCal\001LeaveCalendar", split them etc but none of the code works, it...
  18. S

    Paste to Outlook Calendar

    That code won't help either Hi, The code on that link won't really help me either, it just saves to the default calendar. I really think unless someone knows how to set the appointment in a personal folder, that my paste idea is the only way to go. Can I ask again if anyone knows how to...
  19. S

    Paste to Outlook Calendar

    That's what I want to do Hi, I would like to do that as the calendar is in a personal .pst file, but the code in that link that you gave only specifies mailboxes. I tried loads of different ways to do this and the way I described has brought me the closest so far, if I can just work out how...
  20. S

    Paste to Outlook Calendar

    Really Simple Question (you'd think!) Hi, I've got some code on a form that creates an appointment item, copies it and then opens a program (an Outlook Calendar), then the problem comes. I need to run the paste command in the calendar window, I tried: DoCmd.RunCommand acCmdPaste But that...
Back
Top Bottom