Search results

  1. M

    Help with SQL Query

    Hello, i need a little help with a couple of sql queriesn that refer to the pervious rows. I have a table that imports dynamic tables, and i need to query this data. The tables have been normalised and ive made 4 queries. I now need help with a couple more. The database ive made is used for...
  2. M

    Open template, tranfer data and run macro.

    Is it possible to open a excel template, transfer the data into it, and then run a macro already created on the template? Code so far: Dim strPath As String Dim xlApp As Object Dim xlSheet As Object strPath = "C:\test.xls" ------- I can imagine its a change here ------- Set xlApp =...
  3. M

    Count columns to query

    Hello, im importing a .csv file into a table and running queries on the fly. I have 2 static columns and the rest are dynamic. I want to count the amount of fields from the original import, remove the 2 static fields from the count, then use the count number to make that amount of column...
  4. M

    Liverpool 9 - Benfica 0

    Just a nice little score prediction. Im thinking Fowler and Crouch both getting hat tricks, gerrard getting 2 and carragher getting 1
  5. M

    Champions League 2nd Round Draw

    Come on liverpool! Look for me in the kop, ill be the one with 'How'd you like them apples Manchester' banner :p
  6. M

    dynamic queries

    i have a database that imports files with dynamic amounts of fields, runs querys on the data and outputs it to a speadsheet. The The problem is instead of making it run querys on each column, i have it running on them all collectively. Now i want to change it so a query is run on each column...
  7. M

    Help writing queries

    Hello, i have a database that imports a file, the file is added to a table and then queries are run on it. From here it is exported into a .txt file. The file im importing and processing is about rainfall over a 25 year period. Ill attach some test data to this post as a example of what it looks...
  8. M

    Export and format

    Ive compiled the following code but im having a few problems. The first is runtime error 2135 - this property is read only and cant be set. This error occurs during the export process, the file is exported but this error needs to do. The second problem is formatting, i want to add multiple...
  9. M

    Export a query and ask for a file name

    lo mate, thanks for the reply. I believe it breaks here. ExportDelimitedText "TotalNumberOfTimesteps", strRequiredFilename I followed your advice and changed the code and got the same error. The file extension doesnt need to be given because sub 2 states that if no extension is given, it...
  10. M

    Export a query and ask for a file name

    My test data was too big so ill just post the code from the db. im trying to get the statement in this sub: Private Sub Command3_Click() Dim strFilter As String Dim lngFlags As Long Dim strInputFilename As String Dim ReturnResult As String Dim strMsg As String strFilter =...
  11. M

    Export a query and ask for a file name

    Ive compiled some code to import a file, run a query then export it to a file that the user chooses a name for. The problem is.. it doesnt work. The file imports, the queries are run, but once the user is prompted for a name something goes wrong and the wrong name is assigned to the file. Also...
  12. M

    Msgbox input as export file name

    I have a file thats imported into the database, its added to a table, then queries are run on it. I want to then output it to a .txt file. The problem is i want the user to be prompted with an input box that asks the user what they would like to call the file. The input should be stored as a...
  13. M

    Where am i meant to add query?

    I have to hand code a query, i have called it Rain_Data. This is the main part of the query. SELECT DATEVALUE(Time), Seconds, (Select TOP 1 Seconds FROM tblImportTableTest) / 3600 as hourFrac, CDEC(testa, 7) as A, CDEC(testb, 7) as B, CDEC(testc, 7) as C, CDEC(testd, 7) as D, CDEC(teste, 7) as...
  14. M

    sql for access query

    Im importing a file into access and i want to add querys. The problem is the field im querying wont always be in the same place or be the same name. The only thing that remains the same is that the field i want to query will always be the last column. Anyone know what to do for this?? Thanks...
  15. M

    Criteria based on the value in another field

    any chance with mine i want a similar thing but the table im querying is brought in by the '*' because most of the fields will change depending on what info is in the table. The only 2 constant fields are time and seconds. I want to show how many of these changing fields are below 0.001. Any...
  16. M

    Creating basic queries

    The first row cant have names because its going to change.. the only 2 fields that will stay constant are Time and Seconds the rest of the fields represent nodes that will change depending on what file is imported. Seconds is timestep. The file im importing is comming from infoworks, a program...
  17. M

    Creating basic queries

    Maybe I should explain more.. I need to make a query that shows the number of time steps that are over 0.001. Ive opened the query page and added what i believe to be the relevant fields to the database but im unsure which criteria box i should be putting in the equation. Also im not 100% sure...
  18. M

    Creating basic queries

    I need help setting up some basic queries on my database, i dont really know what fields im meant to be querying so help would be great. Sample data Included in attachment. In the sample, seconds is the time step, so 5 minutes would be 300 seconds. Queries i need to create: Query 1 -...
  19. M

    Code some queries?

    i just want to run these queries but they need to be run over the entire db
  20. M

    Code some queries?

    Thanks mate, but im not sure if thats gonna work because it needs to stretch to cover the amount of fields being imported.. so if 6 fields are imported it needs to cover 6 or if 9 are imported it needs to cover 9
Back
Top Bottom