Search results

  1. S

    Syntax error on dynamic query.

    I've tried the fields like_this with and without square brackets around them to no avail and Pat, I've only included the Chr(13) and Chr(10) so I can see what it builds more clearly in my messagebox's. I've now replaced them with vbCrLf as per Mile-O-Phile's previous suggestion. I haven't put...
  2. S

    Syntax error on dynamic query.

    Sorry for being stupid but I don't really understand what you mean by If you mean, write a normal select query then use that instead of my 'Standards' table as the source for my dynamic query then I don't think it will work that way round. Three of the fields I need to return are memo fields...
  3. S

    Syntax error on dynamic query.

    My sub query is dynamic though. I'm happy to use a normal query but it needs to have my dynamic query as a sub query and I don't know how to include it with a normal query.
  4. S

    Syntax error on dynamic query.

    Additional help required. Now that I have that working, I need to use that query in another query. I have done this with the query builder and the sql code it generates looks like this. SELECT Standards.Standard_ID, Standards.Module_Number, Standards.Standard_Number...
  5. S

    Syntax error on dynamic query.

    Thanks for the suggestion. In checking the brackets against a query generated by query builder I noticed a shorter line. I had missed a letter out of one of the words!!
  6. S

    Syntax error on dynamic query.

    I have a form set up with various options to select records. I'm trying to write a dynamic sql query which I can use as the record source. I've set it up as a function which I then set as the form's recordsource on load. Everytime I open the form though, I get a Runtime error 3135. Syntax error...
  7. S

    Combo box column display

    OK. Thanks.
  8. S

    Combo box column display

    I have a combobox on a form, with 2 columns. The first column is ID and the second is Name. The ID column is the bound one. When I set the first column width to 0 so I can only see the second column and select a value, the second column is displayed as my choice in the combobox. If I change the...
  9. S

    Combobox Highlight Colour

    I thought that might be the case. Thanks anyway.
  10. S

    Combobox Highlight Colour

    I've got a combobox with a purplish blueish back colour which looks ok. The problem I have though is that when I use the drop down list, as I move the mouse over an entry in the list, it becomes highlighted in a horrible yellowish brownish colour. Does anyone know if it is possible to set the...
  11. S

    Message Box behaving weirdly

    It's definitely still doing the same thing. My code now reads Public Function Backup() Dim fso As FileSystemObject Dim sSourcePath As String Dim sSourceFile As String Dim sBackupPath As String Dim sBackupFile As String Dim strFilter As String Dim strFile As String strFilter =...
  12. S

    Message Box behaving weirdly

    It still returns path\filename.mdb for sBackupPath and -Backup_yy_mm_dd for sBackupFile. I'm going home soon so I'll try again tomorrow and see if my computer has decided to start behaving again. I'll let you know. Thanks Stephen
  13. S

    Message Box behaving weirdly

    It returns exactly the same as sBackupPath i.e. mypath\filename.mdb
  14. S

    Message Box behaving weirdly

    I'm using ghudson's backupandzipit function with a few alterations which is working fine. I get a backup file called filename.mdb-Backup_yy_mm_dd which is what I want but the message boxes return mypath\filename.mdb for sBackupPath and -Backup_yy_mm_dd for sBackupFile whereas I want mypath\ for...
  15. S

    Compacted Date

    Thanks Mile-O-Phile The latter one has helped me a bit and I have managed to partially solve my problem without any coding. I have used the a macro to record the date and then the send keys function to choose compact from the menus i.e. "%tdc" which means I can automatically compact the...
  16. S

    Compacted Date

    Is that straightforward to do? I haven't done much with vba so could you point me in the right direction?
  17. S

    Compacted Date

    Can anyone tell me a way to retrieve the date a database was last compacted?
  18. S

    Delete Records Button Disabled

    What makes a query un-editable? It's only a select query. I thought it could be because it also had a field from a linked table in but I took that out and it still won't let me delete.
  19. S

    Delete Records Button Disabled

    I have a database with a continuous form listing my records. Unfortunately I seem to be unable to delete records from within this form even though 'Allow Deletions' is set to 'Yes'. The delete record button on the toolbar is greyed out and if I select a record and hit the delete key, I get a...
  20. S

    Choose 2 of 3 options in query.

    Excellent. That works perfectly. I did find a solution similar to this under another post but I couldn't get that one to work. Thanks EMP
Back
Top Bottom