Search results

  1. TinkerMan

    Is it possible to use an expression to select field in query

    Underlaying Query Yes, that is the way I normally do it, but I have found this to be neccessary when the parameter is not part of the Query that the select is going against, but a query further down the chain. If I omit the "qd.Parameters![queryDate] = myDate" I get prompted for the date, which...
  2. TinkerMan

    Is it possible to use an expression to select field in query

    QueryDefs I'm a little confused. When ever I need to query something in VBA I use the query string when creating a QueryDef. This is the only way that I know of that allows me to set query parameters: Dim rst As DAO.Recordset Dim qd As DAO.QueryDef Dim dbs As DAO.Database sql =...
  3. TinkerMan

    Is it possible to use an expression to select field in query

    Thanks Thanks for the replies. I see the difference on static and dynamic SQL. So, that means that I need to either create temporary or named QueryDefs in VBA, and then use that as a foundation for my form query (which is also created in VBA). I guess I need to use temporary QD's, as having...
  4. TinkerMan

    Is it possible to use an expression to select field in query

    Hi :-) I though this was going to be really simple, but it was not. Maybe I'm overlooking something really simple (which will explain the lack of posts I found on it). Consider a table with col1, col2, col3 etc. In a query you want to decide which column to use runtime i.e: select colx, coly...
  5. TinkerMan

    Export a RecordSet to Excel

    Just what I needed Thanks again :) This is exactly what I need. Many thanks for your help :D TinkerMan
  6. TinkerMan

    Export a RecordSet to Excel

    Excellent !! Thanks allan57 :) This looks very promising. I will test it later today :) As a short follow-up question: How would you go about it if you wanted to use a template in excel, such that the formatting would be a bit nicer? Thanks :cool:
  7. TinkerMan

    Export a RecordSet to Excel

    Hi all :-) I have searched for this particular problem, but no solutions found so far. Forgive me if I have missed it. If I have, just point me in the right direction... I have a query I need to run in VBA (DAO) as dnamic and it needs parameters. Also, if the query is run another way, the user...
  8. TinkerMan

    SQL against query fails

    Solved Thanks modest for your suggestion. unfortunately it did not work, as the connection already was open(!). I have twisted and turned this in all angles, but fortunately I found the problem: It turned out to be the parameter to the underlying queries. The parameter query was refering to a...
  9. TinkerMan

    SQL against query fails

    HI :) I'm having a strange problem. I found no posts on this, so I guess I'm doing a real rookie mistake. I have this function (simplified): Function someFunction(aDate As Date) Dim rst As New ADODB.Recordset Dim rstSQL As String rstSQL = "SELECT col FROM [query];" MsgBox...
  10. TinkerMan

    Linking two Combo-boxes within a subform

    Try using events This is a crude suggestion, but it should work. If you put code on your first combobox's afterUpdate event, and put this code in it: me.combo2.rowsource = "Brown;Black" You can of course do some more intelligent on which colours to pick to which hat. Hope this helps :)
  11. TinkerMan

    Unbound field problems

    Thanks lagbolt :) Yes, in a "normal" order scenarion your solution is the appripriate one, but I'm not sure if it applies in mine. I'm sorry for not giving this information in the original post, but I have some complicating factors. Orders are not formalised in the normal sense, as customers...
  12. TinkerMan

    Unbound field problems

    Hi all :) Consider the following: I have orders from an order table, a table for delivered items (as customer might not get wat is ordered due to various reasons), a client table and an item table. My current problem revolves around the packers form, to enter what is delivered in a simple...
  13. TinkerMan

    Experts needed: Summary challenge

    Excellent Pat :) (Swift should be you middle name!) I tried it and it works!! I get the columns exactly where I want :D However, one small thing is still remaining. As there order and ItemDays contains orders for a long time period, the query needs to filter out those orders that are...
  14. TinkerMan

    Experts needed: Summary challenge

    Thanks for the swift reply Pat :) Yes, it sounds better as well. I have done a quick test and yes, using a crosstab will transpose back to what I already had. Q1: As all orders are of the same type and item, would it be wrong/better/worse to put the Type and ItemID into the order table? As I...
  15. TinkerMan

    Experts needed: Summary challenge

    Greetings :cool: (Thanks for an excellent forum, by the way!) I have a 2,5/3 dimensional problem, which my lack of solving, is taken out on my hair :( I'm working with A2k, more specifically a production system. The major thing is the orders. The "special" thing is that the orders are for...
Back
Top Bottom