Search results

  1. M

    Syntax error in INSERT INTO statement

    It appears that the word 'Order' is reserved and I have had to use brackets... Thanks for your help!
  2. M

    Syntax error in INSERT INTO statement

    I am getting the following Run-time error '3134': Syntax error in INSERT INTO statement and my Dim declarations are as follows: Dim LastOrderNumber As Long Dim NewOrderNumber As Long To be fair it's not working only with this particular field - Order, when I tried to insert...
  3. M

    Syntax error in INSERT INTO statement

    Hi All I am having a problem with below and getting a run-time error 3134 LastOrderNumber = DMax("Order", "Model_types") NewOrderNumber = CLng(LastOrderNumber + 1) CurrentDb.Execute "INSERT INTO Model_types (Order) " _ & "VALUES (" & NewOrderNumber & ")" The field 'Order' in...
  4. M

    Issue with time stamp

    It's a long story but I have got a database that exports trade orders to excel based on an order type i.e. buy or sell and a reference number. Firstly orders are grouped by order type and then by reference number, so I get Access to export individual spreadsheet containing the same orders by...
  5. M

    Issue with time stamp

    Brilliant!! Thanks for that. I will test tomorrow and report back.
  6. M

    Issue with time stamp

    Hi I use the following as a time stamp: DateStamp = Format(Now, "dd.mm.yyyy hh-nn-ss") Quite sensibly, every single time I refer to (in different time intervals) the 'DateStamp', it uses current time therefore every time stamp is different. Is there any way to "save" the time stamp so on...
  7. M

    IsNull failing to work

    Cheers John Big Booty! Works perfectly.
  8. M

    IsNull failing to work

    Hi I'm struggling with the logical check in my other code and have created small If statement to check values returned in MsgBox. The problem is whenever Adviser is blank I get VBA returning the Else part of the code. Also when the IFA's name is entered it does work properly with returning...
  9. M

    Creating new email and DLookup problem

    Fantastic! Thanks
  10. M

    Creating new email and DLookup problem

    Hi I have got some basic code that creates an email in which body text depends on a value od my Combobox. I have created a small table with pre-defined Email messages and their descriptions. The comboox on a form referrs to description of an email message and a dlookup returns an appropriate...
  11. M

    Mass export to Excel with Loop

    WOW this is quality. Exactly what I needed. Thank you very much
  12. M

    Mass export to Excel with Loop

    Gald you've found the error :) I get "something" happening when I press the button. However it comes up with a file naming error. I have attached a screenshot.
  13. M

    Mass export to Excel with Loop

    Ok, I have amended name of the query as well as changed the destination folder, but still no luck. I have atatched a copy of the DB for your reference. I would appreciate if you could take a look.
  14. M

    Mass export to Excel with Loop

    No, I do not get any errors. Simply nothing happens when I click on the button. I am not sure if that may be the cause but the query with a GetPublicSedol() criteria does not display any records when I open it, therefore there is nothing to export. Does it make sense? I will try to upload...
  15. M

    Mass export to Excel with Loop

    vbaInet, many thanks for your help. I have done the following and can't seem to get it to work... 1. In Visual Basic I chose Insert->Module and pasted the first part of the code 2. Updated query's criteria with the "GetPublicSedol()" (in SEDOL's criteria) 3. I have created a button on...
  16. M

    Mass export to Excel with Loop

    Sorry I wasn't clear anough. I would like to be able to run a macro that would firtly open the query and then export excel file(s) based on results in this query.
  17. M

    Mass export to Excel with Loop

    Hi To be fair it doesn't really matter if the files are read-only or not. If I had to choose, I would probably go for read-write. OK, the procedure would be : 1. The query is run and shows the data as in my 1st post. 2. The code is run which will look for changes in the SEDOL column and...
  18. M

    Mass export to Excel with Loop

    Hi No, I have only begun thinking about it. Have no code yet....:(
  19. M

    Mass export to Excel with Loop

    Hi I am trying to figure out the way to export results of my query to Excel. The trick is that in the ideal world there would be a new Excel file created every time a value changes in one of the columns. My query is pretty simple: SELECT [Scheduler Trades].ClientCode, [Scheduler...
  20. M

    Can't assign value to this object (driving me mad)

    Thanks for all your help. I am designing a database which will hold quite a lot of client info relating to insurance policies, dates etc. I have created couple tables holding seperate lots of info grouped in various areas. What I am actually trying to achieve is to have one form with tabs...
Back
Top Bottom