Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. PCLewis

    Access 2003 table exports to text file with wrong field format

    I can't reproduce that issue. Even when I create a column as Single data type with 2 decimal places, the output of integer values of that column remain as they should. No decimal places or trailing 0's. If you could tell me what the column typ eis and the properties, it might help.
  2. PCLewis

    pass-through query - creating prompt

    You can't do it with just a query. If your query is bound to a report or a form then one approach is to create another form to open the object you are after (i.e. the report or form to open). In the popup form you can allow the parameters to be entered, and then in code, change the contents of...
  3. PCLewis

    Run-Time Error 94 will not trap

    Incidentally, for future reference, if you want to re-dimension an array, You can declare it and re-dimension it like this: Dim x() as String . . . ReDim x(20) as String ' this clears the data already in the array . . . ReDim Preserve x(30) ' This preserves any existing Data
  4. PCLewis

    2 Programmers, 1 MDB. Possible?

    No. If you need to allow both people to work on the same modules at the same time then you are ruined. You cannot do it unless they sit on the same chair and use the same keyboard/mouse :) If you want them to work on different modules/classes/forms then you could make two copies of the MDB...
  5. PCLewis

    Comparing Array Objects

    If you are saying that myArray(1,4) = myArray(2,4) and that the instructions after the Then statement are being run there are only two possibilities. 1) you made a mistake - under no circumstances will Access do that. Perhaps myArray is not a simple data type - maybe you have declared it as an...
  6. PCLewis

    Query Criteria printed in Report

    I tried posting this several hours ago but unfortunately there was some proxy problem at my end (I think) Well, if you set the report's recordsource to an sql statement, simply extract the criteria from Me.RecordSource and display it on an unbound text box in the section's Format event. If you...
  7. PCLewis

    Access Query - Group by

    If you were asking about editing records within the crosstab query then certainly you cannot. You can certainly have a crosstab query as the recordsource of a form but of course, no edits are allowed. I notice you useing the Case..End SQL in your example above. If you are more at home...
  8. PCLewis

    Comparing Array Objects

    The Exit For in your code is not good. I assume VB is clever enough to unwind the If..Then branch that you are in at the time but it's not a good practice in my opinion. Especially when more logical alternatives are available. If you put the Exit For after the If..Then, it would be more...
  9. PCLewis

    Weird Dir$() behaviour...

    Dir when called will look for the file or path provided in the first parameter. So if you provide a parameter of "Massive Attack - Protection.mp3 " and if DIR returns with "Massive Attack - Protection.mp3 " then you can be sure that the file exists in the directory specified. Since no...
  10. PCLewis

    Delete Query for SQL beginner

    You can use a query similar to your original query as a sub-query and use the IN clause if you prefer that over the domain aggregate function. e.g. DELETE FROM MB51YTD_Table WHERE MCP IN (SELECT MCP FROM MB51YTD_Table GROUP BY MCP HAVING Sum(Quantity1)=0) That might do it (not sure if...
  11. PCLewis

    Access Query - Group by

    What you are trying to do is called a crosstab query in Access. There is a limit to the number of columns though - maybe about 250 or so. What you should do, is start with a crosstab query that the wizard creates and then build up your criteria from there. I'd recommend considering using a...
  12. PCLewis

    Reading a certain amount of characters from a string

    Take a look at Right$, Left$, Mid$ functions in your VB help.
  13. PCLewis

    Weird Dir$() behaviour...

    I agree. For your purposes, DIR is not ideal. Other examples of when dir$ will give you a result that you don't like could be filenames in your file that are directories. e.g. ".", ".." To answer your question though, I have never seen an example of DIR returning a non empty string when the...
  14. PCLewis

    Number Records or Return Middle N Records

    r937 beat me to it and was rather more succinct ;)
  15. PCLewis

    Number Records or Return Middle N Records

    My concern is that according to something I remember reading a long time ago, nothing guarantees that the top n records will be the same top n as next time unless you use a sort criteria. Access seems to return the same top n every time when no search sort is specified (It seems to return rows...
  16. PCLewis

    Delete Query for SQL beginner

    Please confirm: YOu want to DELETE records OR UPDATE records by changing the contents of a field based on the contents on another field in the same record? I take the latter literal intent from what you have typed. By thinking og the correct verb (UPDATE) you should be a lot close to your...
  17. PCLewis

    Convert Double Data Type

    You touch upon another issue which may well be the root of your problem. I have not been able to work out how the bytes you provided equate to the number 5000 so what if, the bytes you provided are incorrect? The thing is, there are enough points of commonality between my predicted result and...
  18. PCLewis

    Using collection in VB

    ^^ Must depend on particular accent's :P Like in my city's particular dialect of English, the following all sound similar: "Mr. Cool" "Mystical" "Miss Tickle" And, Tell your team leader to get over the collection idea. UNLESS, there is another issue here with accents. Perhaps he said "use...
  19. PCLewis

    Setting an Alpha Number

    I tried very very hard to interpret your requirement and failed. I can tell you how to fix your DMAX statement because that's just syntax. I have no idea whether you are going about your task in the most efficient manner. I am almost sure you aren't, since a single QUERY would probably...
  20. PCLewis

    Convert Double Data Type

    grrr sorry mate but it's not MBF :( I had high hopes too. If the documentation says it's IEEE standard and if VB's docs say that their double is IEEE standard, and the two aren't the same then clearly one is wrong. I tend to have to assume its the Simply software in this case. I haven't...

Part and Inventory Search

Back
Top