Search results

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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) =...
  8. 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...
  9. 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...
  10. 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...
  11. S

    Outlook Personal Folders

    I am trying to setup an outlook folder in Access VBA so that my database can save appointments to a calendar in Outlook, the problem is that I don't want to save them to my calendar but to a joint one with others which I have set up in a personal folder (.pst file) and everyone links to it on...
  12. S

    Need help with recordset code!

    I need more help with my Leave card database, I am trying to set up some code that emails the authorising managers using a query and a subquery to email each manager with the leave requests for them. To do this I have basically cannibalised some code that I used in another database which was set...
  13. S

    Combo RowSource dependant on formula

    I'm trying to make an electronic leave card system for my department at work and I am currently working on a leave entry form. What I want to do is set a combo box for day type to use a limited value list of FULL;HALF to display whether it is a full or half day to be requested (and I only want a...
Back
Top Bottom