Search results

  1. robbydogg

    Error Handling

    Hi, I believe i didn't really give full info of what i needed, but i think i have solved it. I was having issues with the second query failing - it doesn;t matter if it fails but i needed the rest to run anyway. the vb code now rund something like this: Private Sub...
  2. robbydogg

    Error Handling

    if everything is ok, then it shoudl run through all of them, if there's an error with the second query to run, then ignore and go to the next query. tfyh
  3. robbydogg

    Error Handling

    Hi, I'm having trouble understandign the issue with my error handling not working. What i need is the following: Run code queries 1-10 If there's an error in query 2 to 3, then ignore and go onto query 4 and run to the end If all is ok - run everything Finish sounds simple but i'll be...
  4. robbydogg

    Execute Queries in Seperate Databases

    thanks for all your help, the code i finallty used was below. Private Sub Command2_Click() Dim db As DAO.Database Set db = DBEngine.Workspaces(0).OpenDatabase("\\server\folder\folder\SEDC.accdb") db.Execute "Query1", dbFailOnError Set db = Nothing End Sub thanks again tho, as per usual...
  5. robbydogg

    Execute Queries in Seperate Databases

    Hi, When i say IT restrictions i was trying to be nice about the slow performance of the servers here and the fact that i've been waiting for them to install SQL server so i can transfer the storage to there. The databases were created and updtaed by myself so there's no conflict between...
  6. robbydogg

    Execute Queries in Seperate Databases

    Hi, I've been looking around for a while, but can't find a solution to what i need. Due to IT restritions I have 3 databases, on of which holds order data, one holds sales data and the other to hold the summary tables and reporting suite. I'm looking for a bit of code, where i can click a...
  7. robbydogg

    Display an Ampersand

    Well this was a simple one and i thought i'd share it if it's not too obvious. To display an ampersand (&) ina form etc, you have to write two next to each other. So, "Check & Confirm" becomes "Check && Confirm" Hopefully at least 1 person might find this useful sometime in the future.
  8. robbydogg

    Exporting to specific Excel range

    hi, yep it works exactly as i need it to now - i've made a couple of tweaks so that it changes the range for each different month sleceted but yep it's running smoothly. thanks for all your help.
  9. robbydogg

    Export query results to specific cell in Excel

    Right - got it sorted. Here's how i did it in easy steps for anyone else to use. 1. Open up the excel document you want to export the data to. select the area you wish for the data to be pasted in In the top left there will a cell naming box, you can name this selected are anything you...
  10. robbydogg

    Export query results to specific cell in Excel

    hi, i haven't even got a clue how to do that :) the query i'm running is as follows: SELECT tbl_EPOutput.EPREF, tbl_EPOutput.EPValue FROM tbl_EPOutput; union SELECT tbl_ONSGIOutput.ONSGIRef, tbl_ONSGIOutput.ONSGIValue FROM tbl_ONSGIOutput; union SELECT tbl_Output.OSPREF...
  11. robbydogg

    Export query results to specific cell in Excel

    Hello, I have spent most of today trying to find the answer, attempting different method and searching for all i'm worth but nothing so far has worked. I have a query called Qry_Output - which has 2 columns - Reference_Name and Value which i would like to be able to click a button and it...
  12. robbydogg

    Exporting to specific Excel range

    Hi Bob, I've tried to use the code as supplied above but get the error message: Compile Error: User Defined type not defined. Do you have any ideas where i'm going wrong? thanks. Public Function SendTQ2ExcelSheet(strTQName As String, strSheetName As String, Optional strFilePath As...
  13. robbydogg

    =date() function not working

    somehow i fixed it. i deleted the textbox which was causing the problem. created a new one in exactly the same way as before - and hey presto - it worked. not sure why it would make a difference, because it is exactly the same, but i suppose this is the wonderful world of illogical logics. :)
  14. robbydogg

    =date() function not working

    Hi, thanks for your help. I have double checked and there's nothign which conflicts on the database. I also notice that i have a module which opens up a calendar function (which is the same as supplied on this forum) which doesn't do anything. Researching on this, it seems that there's a...
  15. robbydogg

    =date() function not working

    Hello, I have created a database which multiple users are logged into and it works fine. Apart from 1 user. Because of the way the system works, it requires a filed to be populate with a date. This is automatically done using the =DATE() function. This user has the message ?name in the box...
  16. robbydogg

    If Statement error

    thanks for the info - whilst checking it out, i stumbled on the fact that i should have probably set it up slightly differently (by putting a new line after the Then statement), this now works: Private Sub Command320_Click() On Error Resume Next If Me.SrchID.Value > "" Then...
  17. robbydogg

    If Statement error

    Hello, I am using the below VB code to try and send a load of values from one form to another, but only if they are not nul. I run the code and it states " Compile Error: Else without IF and highlights the first occurance of the Else statement. Any help would be much appreciated :)...
  18. robbydogg

    Open Specific Folder

    hi, after a bit of searching on this site, i found exatcly what i needed. Private Sub Command8_GotFocus() Dim stAppName As String stAppName = """C:\WINDOWS\explorer.exe"" /e, \\SVR034\Public\ Data\Data Extracts" Call Shell(stAppName, 1) End Sub thanks rob
  19. robbydogg

    Open Specific Folder

    Hello, Hopefully this is a really simple request - All i need is a bit of code to runt aht opens a specific folder on the network, after running off a few items first. I have put in the code to run the queries / macros i need but after this i want it to open the folder and display the...
  20. robbydogg

    Import Table Via Macro

    Managed to solve it myself through a bit of searching: Private Sub Command4_Click() DoCmd.TransferDatabase acLink, "Microsoft Access", Forms!frmUpdate!Text1.Value, acTable, "PartsDespatches", "PartsDespatches"
Back
Top Bottom