Search results

  1. T

    data type mismatch in select query?

    put your SQL into a string variable and debug.print it to make sure you're constructing it properly i.e. you end up with "WHERE numericField = 1234" rather than "Where numeric field = me.txtbox.value" having just looked at your SQL string, the latter is what is happening.
  2. T

    Exporting table contents into a .TXT file

    wrapping text in quotes in a delimited file is pretty standard, it prevents this is some text, with a potential delimiter in it being treated as two columns in a comma delimited file. Everything within the quotes is treated as a single block of text. You can create a text export without...
  3. T

    can't read from temp table which was created from VBA backend

    I'd suspect that the table is being created in the front end rather than the back. Some more detail around the construction of the cn object would be helpful though.
  4. T

    Need to log data changes in readable format

    triggers on update/delete and an "audit" table would do it. Effectively mirror the live table, use the PK from the live as an FK on the audit table, whenever an UPDATE is received on the live table, insert the current data, into the audit table before the UPDATE is applied. The live table...
  5. T

    Percentage of total in Query

    You'd need a [sub] query that gives you the total of the whole: SELECT Count(call.issueTypeID) as totalCalls FROM calls Save that as qryTotal or something Use that in your other query, No Join is necessary, it's a one field and applies to every result: SELECT Calls.SKU, [Issue...
  6. T

    Help Sharing Database

    Perhaps a meeting with IT is a place to start? (I know, I know :D) If they're actively preventing you implementing an Access Solution, what's their preferred solution? i.e. will they give you som space on a SQL server, or whatever DB infrastructure they use?
  7. T

    VBA/Module Query Automation

    If the structure of the table isn't changing, don't delete it, you lose your indexes, keys etc. Just delete the contents of it and import a new dataset. query syntax for Deleteing a table, if you really want to delete it is: DROP TABLE tablename; This will delete the entire table and all...
  8. T

    VBA/Module Query Automation

    The man's right, I blame the idiot who posted the original code.:o
  9. T

    Help Sharing Database

    You could do, it'd be messy though and trying to ensure that everyone using a copy of your database was using the same data would be an utter nightmare. I know there's better integration with Sharepoint in 2007 onwards, but I'd be a liar if I said I was that knowledgeable about it, perhaps...
  10. T

    Help Sharing Database

    Standard option is to split your database into a Front End, which contains all the Forms, reports, code and queries. This can be distributed to your users. The back end contains all your tables and can be placed on a network drive/share. The front end connects to the back using linked...
  11. T

    Datatype mismatch error 3464

    You should check your query : "Q: Standard Claim Info for Forms" A data mismatch generally occurs because you're trying to compare two different types of data (generally tends to be Text and Number). As the query doesn't appear to take any input, check the JOIN columns within that query to...
  12. T

    VBA/Module Query Automation

    An easy solution I use is to create a table to hold the queries that I want to run as part of a process with a RunOrder Column ie RunOrder QueryName 1 qryINSERT_AnExcelFile 2 qryUPDATE_thatData 3 qryUPDATE_adifferentBitofData I then have a query...
  13. T

    data type mismatch in select query?

    It generally means you're trying to compare two fields of a different data type, Ie a text field to a number field. Check your Join and WHERE clause columns to make sure you're comparing like for like.
  14. T

    Select Query - Max

    If you can get used to using SQL view (in conjunction with the design view which does have its place, especially for speeding up making fairly basic queries) then you'll find that you have much more flexbility and control available to you. the worst thing about SQL view is that it exposes you...
  15. T

    ASP.net Code question

    It's also far more secure, the first example query was extremely vulnerable to SQL injection.
  16. T

    Problems with

    You have special Characters in your column names AND spaces (in combination with underscores and CamelCase!), You also seem to have attachments duplicated in 3 different tables. I'm guessing as a lookup column (never used them myself, they're an even bigger work of Satan than the other...
  17. T

    Update table via VBA code

    Don't do it unless there's no other option. FieldC is a calculated field based on the values of Fields A and B, what happens if someone updates field A but forgets to Update FieldC? The information is now wrong so work it out only when you need to use it. Same applies for your second example...
  18. T

    How do I avoid orphan data?

    If you're using an active/inactive flag you aren't leaving a group without a contact. If you have referential integrity on your relationships you can't DELETE that Contact record from the Table if it belongs to a [number of] Groups and that would leave the Group with an orphan reference to the...
  19. T

    Re: Need Help

    Re: Need Help If nothing else becuase that still makes things clear as mud, calling your tables things like PP1 and your columns x1 will make your system impossible to navigate not just for anyone else but, after a day or two, for you as well.
  20. T

    DAO.Recordset not returning any results

    You're testing for whether the recordset has data by using the .recordcount To accurately report the .recordcount you need to go to the end of the recordset: rs.movelast before you check the .recordcount A better way of determining whether you have records present is to use the .EOF (end of...
Back
Top Bottom