Recent content by rgwood86

  1. R

    Loop macro using list of different parameters

    Thanks Colin. Here is the code for one of the macros that I want to loop: Function Standard_contract() On Error GoTo Standard_duplicate_contract_pre_price_freeze_Err KillMyFile DoCmd.OutputTo acOutputReport, "rpt_102 Page 1", "PDFFormat(*.pdf)", "h:\desktop\New contracts" &...
  2. R

    Loop macro using list of different parameters

    Hi All, I have a query which I want to run as many times as there are unique values in a field within a table in the same database. My query is set to look at a field on a form, but I would like to run this macro for all unique values in the table of which there are approximately 2,000! My...
  3. R

    Display all query fields even if criteria is not met

    Sorry to confuse you further CJ! Ok, for the above example, just replace location with new starter, and Birmingham with "New Starter". Shouldn't have added location into the mix, just tried to use it as an example! So if the answer is Peter Smith, "New Starter" would appear in the column. If...
  4. R

    Display all query fields even if criteria is not met

    Sorry, so my query is based on a table that has a column in it names "Sales Source". This is the staff member who has processed a sale. I want the query to display the Sales Source for each row, but based on the result of the sales source, display different results in another column. For...
  5. R

    Display all query fields even if criteria is not met

    Hi all, I have a query which has a field in it which returns a staff members name. I need a separate field which based on who it is that is named, will return either a specific text such as "New Sale" or a blank result if it is a different member of staff that is not listed in the criteria...
  6. R

    Adding query results to text in report

    Hi all, Is it possible, just like you would do on a mail merge in Word, to have a report that is predominantly text, but that has inserts which refers to the results of a query. For example, a query may return the result of a persons name and address, and I would need this to form part of...
  7. R

    Can you help me write a simple code?

    Colin...... I could kiss you right now!!! Thanks again :):):):)
  8. R

    Can you help me write a simple code?

    Nearly there!!! Ok, so the below code works perfectly other than I still get the error message appear, but at least it does open the test database and closes the one I started the code in. Is there a way of removing this error message? The error message only appears once and fills the screen...
  9. R

    Can you help me write a simple code?

    Ah I think I may have found the problem. I specified the exact path, but because the file is saved deep in many folders, some of which contain two words as the name of the folder, it is the space in these e.g. G:\2018\Data\Client Data\.... that is causing the problem. It looks like up to...
  10. R

    Can you help me write a simple code?

    Thank you jdraw. I have copied and pasted your edited code over mine, but still get the same error message: The command line you used to start Microsoft Access contains an operation that Microsoft Access doesn't recognise. Exit and restart Microsoft Access using valid command-line options.
  11. R

    Can you help me write a simple code?

    I have no idea how the back slash appeared to be missing when I copied and pasted the above...it was definitely there in the code (which is as below), but I am still getting the error message Public Function OpenDatabase() On Error GoTo ErrHandler Dim strPath As String, strName As String...
  12. R

    Can you help me write a simple code?

    Sorry Colin, I didn't think it would work as I read it that the first DB would still be open. I have tried it now, (every file is saved in the same folder so I assume the only thing I need to replace in the code you kindly provided is the file name - Test.accdb). So I put the below in a...
  13. R

    Can you help me write a simple code?

    Yes, and that's great I really do appreciate this - but as far as I understand it, this wont work as the 1st database will already be open and this stops the code working as planned which is why I was trying to work out a way of closing one database and opening another in that order
  14. R

    Can you help me write a simple code?

    Ok so my problem is. I have a linked table in an Access database to an excel file. The Excel file gets data from an external source and I need to refresh the connections to allow me to use the new data which can change multiple times throughout the day. So I have the code that does this...
  15. R

    Can you help me write a simple code?

    Would putting some sort of timer on the open code allow the process to start, but with enough of a delay to allow the other database to be closed before the 2nd database actually opened?
Back
Top Bottom