Search results

  1. F

    Update All Fields and Wild Cards

    I want to permantently store all records from my Project_Table into a table called Excluded_Trades where the Project_ID field of Project_Table is equal to 276. My next operation is to delete these records from Project_Table
  2. F

    Update All Fields and Wild Cards

    Can anyone see what is wrong with this: UPDATE Excluded_Trades INNER JOIN Project_Table SET Excluded_Trades.* = Project_Table.* WHERE Project_Table.Project_ID = 276; If I can't use wild cards, how would I do this? I should add that Excluded_Trades has the same table structure as...
  3. F

    On the fly calc, two tables

    Hi Pivateer, thanks for your reply. I want to do the join on 'currency pair' and date. Made this effort which was rejected by access: UPDATE [SE2 Project Table] INNER JOIN TimeStampData ON ([SE2 Project Table].[Trade Date]=DateValue(TimeStampData.Date_Time)) AND ([SE2 Project...
  4. F

    On the fly calc, two tables

    I have the following query which nicely calculates the standard deviation from my table TSTable where the dates are within a given range and the currency is as defined: SELECT STDEV(vol) FROM [SELECT (High+Low)/2 AS vol FROM TSTable WHERE (Date_Time Between #6/2/2011# And #6/3/2011#) And...
  5. F

    Round Down Time to nearest 15min

    There is nothing like re-inventing the wheel! Thanks both for your help, got it working with the timeserial function and also doing it on the fly. Martin
  6. F

    Round Down Time to nearest 15min

    Thanks for your reply, and the select case. On the fly is probably best and I may move to that. For now though I am not sure how to apply a user defined function in an SQL statement. Doing... strSQL = "UPDATE [SE2 Project Table] " & _ "SET [SE2 Project...
  7. F

    Round Down Time to nearest 15min

    Ok I think I have solved it with following functions. But how do I call this function in an SQL statement. is it just: UPDATE MainTable SET MainTable.RoundedTime = Module2.RoundedDate(MainTable.TimeStamp) Function RoundDwn(ByVal InNum As Integer) As Integer If InNum < 15 Then...
  8. F

    Round Down Time to nearest 15min

    Ok I could do this perhaps using the Datepart function to breakout the minutes, hours etc. In Excel i would glue this back together with the time function. But it seems there is no equivalent in VBA?
  9. F

    Round Down Time to nearest 15min

    Is there an SQL function which will round down a time like 11:56:18 to 11:45 for example?
  10. F

    Runtime error: The database has been placed in a state by user ...

    Hi. I think I abondoned this method altogether and went with a dao connection. Sounds like u got your answer though. Martin
  11. F

    Cut and paste query

    Thank you, i'll consider your observations re naming fields.
  12. F

    Export Chart to Excel

    On the double click event of chart view I have: Me.PivotTable.Export "D:\filepath\test.xls", plExportActionOpenInExcel But this does not give me the chart, just the pivot table and data. It also gives the error "Problems during load". Doing: Me.ChartSpace.ExportPicture...
  13. F

    Cut and paste query

    Against all odds, I figured it out myself: INSERT INTO [Excluded Trades] SELECT * FROM [SE2 Project Table] WHERE [Type Forward/Spot]='Forward' And ([Forward Outright High] Is Null Or [Forward Outright Low] Is Null) And [Project ID]=61;
  14. F

    Cut and paste query

    I want to delete records from one table [Project Table] where there are blanks and add these records to a different existing table [Excluded Trades]. [Excluded Trades] has the same structure as [Project Table]. This query succesfully selects the records to be extracted: Table [Excluded...
  15. F

    Update inner join on .... And on

    Here is the logic: if field-a and field-b are in table-y then field-c is set to alpha here is my SQL UPDATE TableX INNER JOIN TableY ON (TableX.FieldA = TableY.Currency AND TableX.FieldB=TableY.Currency) SET TableX.FieldC = 'alpha'; But this doesn't update when it should. Where am I...
  16. F

    Form Navigation Buttons and Datasheets

    :rolleyes: it seems to work now. not sure what failed before!
  17. F

    Form Navigation Buttons and Datasheets

    I would like to display some data as a datasheet. But I also want to provide the user with some simple functions such as closing the form using a command button, perhaps clicking a button to export data. I can't seem to find a way to display a datasheet in a form and have command buttons...
  18. F

    Create a table from SELECT SQL statement

    Great, works a treat. Thanks
  19. F

    Create a table from SELECT SQL statement

    qdf.sql gives the error: "Compile error: Method or data member not found" are you sure we want dim qdf as dao.database rather than dao.querydef ?
  20. F

    Create a table from SELECT SQL statement

    This nearly worked - thank you! I had to play around with the structure a bit for some reason. In the end I went with: Dim DB As DAO.Database Dim qdf As DAO.QueryDef Set DB = CurrentDb With DB strSQL = "SELECT ... ;" Set qdf = .CreateQueryDef("Spot_Pairs_Query", strSQL) End...
Back
Top Bottom