Search results

  1. K

    Sorting by date

    I am having an issue with a query. It is returning dates that have been formatted in mmm 'yy format, meaning Jan '11, Feb '11, and so on. For whatever reason when sorted it relies on A-Z instead of Newest to Oldest and so on. Jan '11 is being displayed first, then Jan '10, then Feb '11, Feb...
  2. K

    "Group by" causes "ODBC--Call Failed" error

    The only way I could temp fix this was to append [View All Allotments] to a local table first...then everything works. This is similar to the "Query too complex" error I was recieving and had to fix the same way...no clue at all why this is happening when dealing with linked SQL Server tables...
  3. K

    "Group by" causes "ODBC--Call Failed" error

    I have the following query that works perfectly: SELECT [Q02 AUSTELL L/E].[Report Dt], [Q02 AUSTELL L/E].Terminal, [Q02 AUSTELL L/E].[L/E], Count([Q02 AUSTELL L/E].[L/E]) AS [Total Onhand Units], [View All Allotments].Allowed, Forms!MAIN!STARTDATE AS [Min Report Dt], Forms!MAIN!ENDDATE AS...
  4. K

    Query in VBA error "between op without and"

    Wow that's insane O_o. I didn't even notice that. The strange thing is that this code was copy/pasted from a working database where it runs perfectly. But yeah it works now in this one lol, thanks.
  5. K

    Query in VBA error "between op without and"

    I may be missing something simple, perhaps a fresh pair of eyes will help. I have the following code running a query in VBA Else strSQL = "SELECT [Q01 Generate Data with Duplicates].[Report Dt], [Q01 Generate Data with Duplicates].Controller, [Q01 Generate Data with Duplicates].Terminal, [Q01...
  6. K

    Import into ODBC linked-table error

    I think I ended up solving this one...I changed all of my Date datatypes to Datetime in SQL Server, and Time datatypes to Varchar. After that all of my datetime fields importing fine from Access...
  7. K

    Import into ODBC linked-table error

    I am attempting to import an Excel file into SQL Server 08, by using an Access front-end. When I attempt to import the file, I recieve the following error: ODBC--insert on a linked table 'dbo_OLDDATA' failed. [Microsoft][SQL Server Native Client 10.0]Invalid character value for cast...
  8. K

    Query too complex error

    I noticed a strange problem with a query I am trying to contruct. I have a Union query that runs perfectly fine...however if I made a second query that uses it, everything returns a "Query too complex error". So let me try to explain... The first query is below. "Q01 Generate Data With...
  9. K

    Date exporting in wrong format

    I ended up finding out the answer a little bit after posting. I had to create a query off of the table and format it. SELECT Format([Table].[Field],"yyyy-mm-dd") AS FormattedDate......
  10. K

    Date exporting in wrong format

    While exporting my table in a comma delimited file, I noticed my date is re-formatting itself before export. It is currently set in the format of yyyy-mm-dd, but exports as mm/dd/yy 00:00:00. I thought I would outsmart it by creating a new column as text, and copying it over, then exporting...
  11. K

    Passing param. to Report

    Not exactly...I only have a single value, not multiple. But even IN ([Forms]![Main]![txtDBPath]) doesn't work for me. It gives me a syntax error, removing the paren. causes quotes to be put around it and the brackets to be removed.
  12. K

    Passing param. to Report

    I sort of fixed my problem by putting [Forms]![Main]![txtReportEndDate] in place of my start and end dates....so the query pulls the dates from my form, which is fine because it will always be open when ran. If I can figure out how to do the the same with my IN clause I can replace about 20...
  13. K

    Passing param. to Report

    I am a bit confused on how I would structure this query for that. Does the WHERE condition function like a WHERE clause? My dates are inside of a SELECT as you can see below: SELECT [Q03 Units Calculations].*, [T ALLOTMENT].Allowed AS [Allowed Onhand Units], [DAILY CHARGE]*[net onhand units]...
  14. K

    Passing param. to Report

    You'll have to excuse my ignorance. How would I pull it out of the query since the query is the one that needs it? Would I somehow tell the query to refer to what the report is recieving instead? Wouldn't this take away the ability to run the query and report seperately than from only the...
  15. K

    Passing param. to Report

    It does have a space. I am not sure if it makes a difference in the syntax but like I said the parameter is inside of the query that the report is pulling from - so it isn't inside the report itself.
  16. K

    Passing param. to Report

    I made the corrections and unfortunately I am still getting prompted for the Start Date when the report starts.
  17. K

    Passing param. to Report

    They are coming from a textbox that is user defined: strSDate = txtReportStartDate.Value The date is spitting out correctly to a msgbox
  18. K

    Passing param. to Report

    Yes, there is a potential that the report and query will both be used seperately from the form that I will be running the report from.
  19. K

    Passing param. to Report

    I have a report I am opening in VBA, and the report happens to be based off of a query that has two parameters (Start Date, and End Date). I am attempting to open the report with two variables I am sending via VBA. So far I have attempted... strSDate = "Start Date = #" &...
Back
Top Bottom