Recent content by MSherfey

  1. M

    Query to complex for simple UNION query...

    So, just to make sure I understand. If I have everything in one UNION query, Access freaks out because there's too much going on at one time. However, if I make separate queries, Access can run a query, 'save' the results, and then run the next query thus saving its mental state :) I was...
  2. M

    Query to complex for simple UNION query...

    I have, what I think, is a basic union query: SELECT [Breakdown Union xFY].ENDUSER_CUST_NUM, Sum([Breakdown Union xFY].[FY 2009 Covered]) AS [Product Value Sum], "FY09" AS [FY Covered] FROM [Breakdown Union xFY] GROUP BY [Breakdown Union xFY].ENDUSER_CUST_NUM, "FY09" UNION SELECT [Breakdown...
  3. M

    How to utilize VBA...

    All the values are actually text. I'll make the modifications and see how far I get before it blows up :) Thanks. I'll let you know how it works out as well the final code.
  4. M

    How to utilize VBA...

    I recently found this sample code on how to concatenate data fields: Public Function concat_alrgy(Patient_ID) Dim rst As DAO.Recordset Dim db As DAO.Database Dim hold_alrgy As String Set db = CurrentDb hold_alrgy = "" ' clear out old list DoCmd.RunSQL ("delete * from t_patient_alrgy") '...
  5. M

    Importing blank dates from Excel...

    That was it, thank you. I'll just ensure they send actual 'null' fields and not just empty text.
  6. M

    Importing blank dates from Excel...

    I have a decent sized Excel 2007 sheet which contains contract information. One of the fields is the date the customer renewed their contract. If they haven't renewed yet, then the field is blank. When I try to import this sheet into Access 2007 it gives a conversion error on the rows which...
  7. M

    Number formats in a UNION query...

    I don't know how to format the union query I guess. I went ahead and created a simple query and used the union as a sub-query within it. Simply formatted the parent query and all is well. I wonder if that is the simplest method.
  8. M

    Number formats in a UNION query...

    I am having a problem formatting some numbers in a UNION query. I have two simple queries which return basic scores and their average for a specific period. I have each query rounds the averages so I don't get any decimals (EX 9.3333=9). When I use a UNION query to get the two separate...
  9. M

    Adding Text Field...

    SMIG - sorry to sound so stupid here, but where does this get placed? When I put this in the SQL window and try to save (before I start editing) it comes back with an error stating it is an invalid SQL statement and is needing either a DELETE, INSERT, PROCEDURE, SELECT or UPDATE.
  10. M

    Adding Text Field...

    This is pretty cool. I didn't know you could do the code directly like this. I assumed they all had to start with select statements. I'll give this a shot ASAP. Thanks!
  11. M

    Adding Text Field...

    Is this a query in itself or a function I need to define?
  12. M

    Adding Text Field...

    Smig - I'm sorry, but I haven't yet. I hate to admit it, but I'm not sure how. I understand the loops and how they function. And the logic make sense. I'm just not sure how to get Access to count the number of customer ids for each one and set the loops accordingly. I have a bit more time...
  13. M

    Adding Text Field...

    I think I figured out the issue with the 'undefined function' error. I thought I had compiled it, but apparently I had not. Now that it is executing without any issues, the problem is the return results. It now seems to be adding the first 6 records together regardless of which customer id...
  14. M

    Adding Text Field...

    georgedwilkinson, I'm sorry to sound so stupid with this but I'm a bit confused in the instructions. I created the query: SELECT [Breakdown Union xFY].ENDUSER_CUST_NUM, ConcatRelated("[FY 2007 Covered]","[Breakdown Union xFY]") AS Products FROM [Breakdown Union xFY]; 'Breakdown Union xFY' is...
  15. M

    Adding Text Field...

    I am having trouble adding different values in the same text field together. Think of it like doing a SUM on a field in a table. However, with XT it obviously doesn't work. I read how to do this if they were in different fields, but can't figure out how to do this if the values are in the...
Top Bottom