Search results

  1. DrSnuggles

    Syntax Error

    A great way of testing your SQL is against your db. Thus: Whilst in Debug mode, capture the value of sSQL. Stick this into a new SQL window in the database that you are retrieving data from. Then view by 'Design View' and check that everything looks Okay. Then run it. The error message you get...
  2. DrSnuggles

    Syntax Error

    I've noticed another thing. You only need commas to seperate multiple field names. You have a comma after the FROM table statement. Remove this too. ie. SELECT field1, field2 FROM table WHERE CLAUSE. Depending on the SQL you are using, you may need a ';' at the end of your statement too.
  3. DrSnuggles

    Syntax Error

    Might be wrong here (don't do alot of excel VBA), but should it be: SELECT tbldepot.DepotName as [Depot] " & vbCr & _
  4. DrSnuggles

    Rookie questions

    You're going to have problems with having this in one query. It might be easier to make 3 queries. The first 2 to filter the data, the final brings the data together for presentation purposes. First query: Add the two tables in the Query window and make a link between the field Location...
  5. DrSnuggles

    Run a sub procedure

    You can move sub QChecks to a module. This will make it global. You should really define what layername is i.e.: Public sub QChecks(layername as string) As presently it will be a variant (by default) but another developer won't have a clue what you are passing through.
  6. DrSnuggles

    Database suddenly read-only

    Out of interest what was it?
  7. DrSnuggles

    VB6 Recordset

    Why not try something like this: While Not rs.EOF if rs("Field1") = Now() then 'Do Something endif rs.MoveNext Wend
  8. DrSnuggles

    autonumber(PK) link to database?

    Are you linking the Grid Dynamically to the table?
  9. DrSnuggles

    key violation help needed

    You're not inserting a value for the quoteId. By the looks of the error this means that quoteId is a primary key.
  10. DrSnuggles

    Open .mdb from a html?

    I concur with boblarson. This is what I do. Any pointers for the batch file then give me a shout. I recommend creating an mde too.
  11. DrSnuggles

    appending data to a field

    Are you talking about and INSERT statement? Or adding more items to the drop down control?
  12. DrSnuggles

    Simple Code Help

    Look at RecordsetClone. It's very useful.
  13. DrSnuggles

    £ symbol being replaced by œ in outputted text

    Haven't really used the Output To action, usually write to a text file from VBA. Do you know how to do this?
  14. DrSnuggles

    Storing Calculated Fields in a Table

    I take it you have a table full of employees and another table that records all the injuries they incur. You can thus have an ID stored in here for the same injury name. Thus you can do a Groupby, use the DateDiff to calculate the total number of days. Then query on this query for the total...
  15. DrSnuggles

    Need Help With Adding Up Formula.

    Look at DafeDiff function
  16. DrSnuggles

    £ symbol being replaced by œ in outputted text

    Why not use the Snapshot Viewer? Unless you're doing further data manipulation on it.
  17. DrSnuggles

    update stock records?

    dim mstrSQL as string mstrSQL = "DELETE * FROM [Products table name] Where [product id] = #" Execute through connection String . . But this will delete ALL the same products from your table. Is this what you want? I feel you have to extend the WHERE clause??
  18. DrSnuggles

    minor prob with adding data to datagrid

    Did the reply to your previous thread not work? See: http://www.access-programmers.co.uk/forums/showthread.php?t=123993
  19. DrSnuggles

    Refreshing a text box

    What's wrong with this?: txtMyTextBox.setfocus txtMyTextBox.text = DCount("[Any Field Name Here"],[QueryNameHere]") Look at CInt for Casting to Integers.
  20. DrSnuggles

    Yearly Planned Maintenance Report

    If your VBA is quite strong you could alter the query in code based on PPM type. But, I would recommend splitting this Report up by PPM type. The reason for this is that based on the PPM type your query structure is going to change. For instance, for more months to be added in your query add...
Back
Top Bottom