Search results

  1. simongallop

    script access database repair and compact

    In Acc2K compact automaticaly repairs the database. The way that I would do it is to use scheduler to call the access database. Not sure if you can do it directly or whether you need to go through a .bat file. At present I call compact.bat to run at 1am and within compact.bat I have the...
  2. simongallop

    SQL code error!

    You are selecting LAB ID twice (once with the wildcard *)
  3. simongallop

    SQL Statement Error

    What is strA? Also when using Nz in SQL it usualy looks like: ..., Nz([MyFieldName],Val If Null) AS [A new fieldname] Unless strA contains "AS [A new fieldname]" then it will fail as you are putting two Nz's together with no obvious link HTH
  4. simongallop

    Sums in Forms

    Look at DSum HTH
  5. simongallop

    SQL Statement Error

    Nz([Introduction]) " & ' strA ' & " Nz([Conclusion]) AS Message" & _ s/b Nz([Introduction]) '" & strA & "' Nz([Conclusion]) AS Message" & _ ie single quotes within the string not outside it HTH
  6. simongallop

    Auto fill fields from table

    Have sent the db
  7. simongallop

    Auto fill fields from table

    Did you receive my email about suggested restructuring? Would seriously recommend carrying it out and then work on the forms. It will work out a lot easier in the future and you won't be limited to 7 drugs
  8. simongallop

    Command Line Options

    You have to use: "c:\program files\microsoft office\office\msaccess.exe" c:\yourdb path\yourdb.mdb /X MacroName Note: It is a Macro and NOT a module that gets called. If you want to run VBA code then make that code a function and call the function from the macro (RunCode) HTH
  9. simongallop

    Auto fill fields from table

    Have you changed the structure?
  10. simongallop

    query exclusion code

    Sorry did the reply in a rush and didn't explain it thoroughly enough. 1/ Create a query which selects all records that are less than or equal to 13 months old. 2/ Create a query that takes the information from 1/ and select the sites column only. Group on this info (View / Totals) 3/...
  11. simongallop

    query exclusion code

    I would create a query from the 13 months worth of jobs but only report on the sites. I would group by site so that all I get is a list of sites in use. Then I would compare that against my site table, linking on sites and showing all sites in site table that are not present in my query HTH
  12. simongallop

    Leading zeroes to Excel

    The other way is to format the column 0000000000 in Excel after the import (presuming that your field is always 10 digits)
  13. simongallop

    Leading zeroes to Excel

    How about forcing an apostrophe in front of the string as then Excel will read the string as text? ie MyField: "'" & ISBN_Num
  14. simongallop

    Leading zeroes to Excel

    What happens if when in Excel you reformat the field to text. Do the zeros reappear?
  15. simongallop

    dcount + intr

    My code will not work because I copied it from earlier in the post and din't bother to check the form reference. Dcount ("[Nuf]", "DCTest", "Instr(Forms.frmDCT.txtSearch,left([User],3))") The above code works perfectly well in a test form that I built. Just so that you can recreate it...
  16. simongallop

    dcount + intr

    If "cde" is left(Name,3) then: Dcount ("[Field]", "Table", "Instr(([forms]![frmMembers].[Form]![Name]),left([Name],3))") HTH
  17. simongallop

    Run queries with VBA

    You can't add queries together like that. Queries can return one record or a million. how are you to add a million records against 30 records? Either you select a record and add it to another record, or you select the sum of a field and add it to another. Can you carry out this action...
  18. simongallop

    Run queries with VBA

    Docmd.OpenQuery "QueryName" will run the query.
  19. simongallop

    Code to modify query

    OK! In your query design, show the 2 tables and link on the relevent field. Select the fields that you want to show and for the make set the criteria to be: [Forms]![YourFormName]![ComboboxName] HTH
  20. simongallop

    Code to modify query

    To be able to do it then where you store the make of cars in the same line of a record there must be something that says it is a car. Depending on how your data is set up, then there are different ways to get the data. Am presuming that in your combobox you have choices of categories such as...
Back
Top Bottom