Search results

  1. E

    SQL and VBA Insert Null for Unfound Date

    CalculateTotal is the name of the query by the way. How do I return the total number of orders (the last line of code above)? Also, I want to return the result query. Is that possible?
  2. E

    SQL and VBA Insert Null for Unfound Date

    What I've done so far since we last communicated is that I created a query linking table 2 and table 3. I left the line of code that takes in the user input (part number) and looks up the parents in table1 and then later modifies them and looks them up in the created query the same. It compiles...
  3. E

    sql in vba line of code error

    Does anyone know what's wrong with this line of code? It keeps giving me a syntax error... Set rst = CurrentDb.OpenRecordset( _ "Select * from CalculateTotal WHERE ((Structure) Like'*" & u & "*'")AND (((ShipDate) BETWEEN #09/30/2001# AND #10/01/2012#)) ")
  4. E

    sql in vba line of code error

    SQL line of code error :(Does anyone know what's wrong with this line of code? It keeps giving me a syntax error... Set rst = CurrentDb.OpenRecordset( _ "Select * from CalculateTotal WHERE ((Structure) Like'*" & u & "*'")AND (((ShipDate) BETWEEN #09/30/2001# AND #10/01/2012#)) ")
  5. E

    SQL and VBA Insert Null for Unfound Date

    how would I do that if I were to search the structure in a query? Would it be the same?
  6. E

    SQL and VBA Insert Null for Unfound Date

    Ok. What I've been thinking of doing is since the associated parent needs to be modified before it is searched in the structure column of table2, that I would not include it in the query with the other tables. So the query that I would be creating would only include table2 and table3. Table1...
  7. E

    SQL and VBA Insert Null for Unfound Date

    Thanks a lot RX. I'll see what I can do and I'll let you know if I have any more questions :)
  8. E

    SQL and VBA Insert Null for Unfound Date

    I'm an intern at an industrial company and the whole point of my project is to help the manufacturer look up how many orders and items have been shipped between 9/30/2001-10/1/2011 just by entering the part number for the product they are searching for. My code has to go through three tables...
  9. E

    SQL and VBA Insert Null for Unfound Date

    Hi, I'm trying to search through a table with serial card IDs, Order Numbers, and Ship Dates. I'm search through the Serial Card ID column and making my code work so that if the serial card ID exists and its ship date is between 9/30/2001 and 10/1/2011, then retrieve the associated order...
  10. E

    SQL in VBA/ Date Criteria in table

    I'll give it a shot. Thanks a lot Pbaldy. You were really helpful! :)
  11. E

    SQL in VBA/ Date Criteria in table

    I open up the DB Module, press F5, then enter 38A1018X003 when it prompts me to enter the part number... Then I keep pressing enter and EXPECT to get: 1001,11,24 1010 1013 But I now get: 1001,11,24 1010,10,4 1013,31,32 Which means that the date criteria isn't working properly because it's...
  12. E

    SQL in VBA/ Date Criteria in table

    Oh. I didn't notice that. ...But it still doesn't fix the problem. this is so frustrating...
  13. E

    SQL in VBA/ Date Criteria in table

    Okay. this is it. Thank you so much!
  14. E

    SQL in VBA/ Date Criteria in table

    how do i post the db on here? ...I just recently started using this forum
  15. E

    SQL in VBA/ Date Criteria in table

    yea. But it's not working for me. I don't understand. Everything looks good yet it's returning all the values rather than just the ones under the criteria.
  16. E

    SQL in VBA/ Date Criteria in table

    Hi, I've been stuck on this for a very long time and I would appreciate any help I can get. I'm trying to search for a variable (varCod) in a table(SerialNumberCustomer) but I want to only store the returned variable in an array if its shipDate is between 9/30/2001 and 10/1/2012 this is...
  17. E

    SQL in VBA

    How do I use DateValue() exactly? I put in DateValue(ShipDate) but it brought up and error and told me to define ShipDate. ShipDate is the column in the table that has all the dates I want the criteria [ Set rst = CurrentDb.OpenRecordset( _ "Select * from SerialNumberCustomer WHERE...
  18. E

    SQL in VBA

    This is what I did: Set rst = CurrentDb.OpenRecordset( _ "Select * from SerialNumberCustomer WHERE SerialCardId = " & varCod & " AND (ShipDate BETWEEN #09/30/2001# AND #10/01/2012#) ") It's no longer giving me an error but it's also not really working. It's returning values in the...
  19. E

    SQL in VBA

    Isskint? Alexandrian? I like the pic and thanks! I got it figured out. It's compiling but not actually bringing up the correct values that I need. I think it's something with how the dates are formatted in the table. hmn.
  20. E

    SQL in VBA

    Hi, My code keeps bring up an error every time I compile this: "Run-time error '3061': Too few parameters. Expected 1." Can someone please help? I'm not quite sure what the problem is but I think it might have to do with the fact that I'm using 2 AND in the statement below. How can I...
Back
Top Bottom