Search results

  1. V

    Date data type NULL

    this If statement is nested inside a while loop that would go through multiple CNF[Need By Date] and select the oldest and put that one in the DTG variable. I am now having trouble with the next step of the code. If DTG > Date Then tmpOnTime = (tmpOnTime +1) ElseIf DTG < Date & DTG <= (Date...
  2. V

    Date data type NULL

    I figured it out. I had an extra ElseIf statement that was confusing. I removed the main If statement ElseIf and made it a simple Else now the date field is being populated with the proper date.
  3. V

    Date data type NULL

    Dim DTG as String DTG = "" If rsCNF![Need By Date] <> "" Then If DTG = "" Then DTG = rsCNF![Need By Date] ElseIf DTG > rsCNF![Need By Date] Then DTG = rsCNF![Need By Date] End If ElseIf rsCNF![Need By Date] = "" Then If DTG = "" Then DTG =...
  4. V

    Date data type NULL

    OK thank you everyone I will use whats in the field as the blank check. Another question about the date is since the value inside is a time if I am trying to add in MM/DD/YYYY do I need to add that up when i created the DTG variable or will it add into the date variable how i want it?
  5. V

    Date data type NULL

    I have created a date variable in VBA ( DIM DTG as Date ) I want to fill that date by checking to see if the DTG is empty first to fill it with the first date my code comes accross. Thing is that the DTG variable is already filled with #12:00:00 AM# which isnt empty. Can i initialize the...
  6. V

    Are my errors in the right order?

    strCat = "SELECT FulfillmentGroup.[Fulfillment Group] FROM FulfillmentGroup " _ & "WHERE ((FulfillmentGroup.[Fulfillment Group]) Not like 'Rejected' and (FulfillmentGroup.[Fulfillment Group] not like 'Delivered'))" Set rsCDGRCat = dbCurr.OpenRecordset(strCat) strCDGR = "SELECT...
  7. V

    Are my errors in the right order?

    I just got an error with missing operator. So I found I was missing single quotes around a variable and now im getting error too few parameters. Am I going in the right direction or did I make it worse?
  8. V

    Emptying a Recordset

    NSA :) but thank you for repling, I just ask cuz i was getting an error but after reading what you wrote I think my close function should work since i have the rs set at the beginning of the loop and close at the end should work.
  9. V

    Emptying a Recordset

    Can't go too much into detail. I am setting up code to update a table by line based on a certain criteria. I have a recordset that has all the criteria and I want to run through each line 1 by 1 and update the table row by row and i want the RS to empty and fill up again with the next criteria...
  10. V

    Emptying a Recordset

    I am running a loop through a recordset and want to empty it before each loop to fill it with a different variable each time. How do I empty the recordset. I tried rsCNF = Empty but thats not right.
  11. V

    Multiple Queries 1 Button

    ok, how about is there a way to run a non visible query in VBA?
  12. V

    Multiple Queries 1 Button

    Every day new things come in that get added to the database. I have a query that searches for specific parts of everything in the database. I need the button to basically refresh the query so that I can get this data into my form.
  13. V

    Multiple Queries 1 Button

    Yeah I DO NOT want the user to have access to the query but I need the queries to run to get the data that the command button needs. I want the 2 queries to execute to gather any new information since last time the query was run so I can get the most up to date data.
  14. V

    Multiple Queries 1 Button

    Hello I kinda found a solution but i am trying to make it work a little better. I want to run 2 saved queries with the push of one command button through VBA. I know I can just DoCmd.OpenQuery "Name of Query1" DoCmd.OpenQuery "Name of Query2" Does this make the queries visible or are they...
  15. V

    How do I RecordSet

    Select [JCRB Slides Query - Late CIDR].[Fulfillment Group], [JCRB Slides Query - Late CIDR].IIf([DaysLate]>0,"On Time", IIf([DaysLate]<31, "1-30 Days", IIf([DaysLate]<90, "31-90 Days", IIf([DaysLate]<366, "91-1 Year", "Over a Year")))) As Bucket, Count(*) As NumLate FROM [JCRB Slides Query -...
  16. V

    How do I RecordSet

    ok i think im going to throw a wrench into this, I want to figure out how late something is based on the current date. Like I want an event to run from a combo button to do calculations. So basically when the user selects the appropriate threat and then pushes the button the event should...
  17. V

    How do I RecordSet

    I am sorry if I am harping on this but I have only received OJT in coding with NO schooling until the near future so I still don't know how to do this. The need by date that the "dayslate" is ordered from is in the CNF table and the stages are in another table that is linked through the CNF #...
  18. V

    How do I RecordSet

    I have figured out how to do the crosstab query and am now going through my database and playing with this new found knowledge, thank you. I cannot for the life of me figure out how to do the first query you said, the bucket one with the iif statements. Am I making a normal query and inputting...
  19. V

    How do I RecordSet

    In my head I can see how this works but i have never done any query that isn't just clicking the "Query Design" button in the create tab. How do I do these queries?
  20. V

    How do I RecordSet

    Thought on an attempt. I am going to try a loop were it sets tmpValidation, tmpTest, so no and so on, and inside them I would have = sum(IIF(Between Date() and Date() - 30), "[name of query]", [Fulfillment Group] = 'Validation') Would that work? Like would it loop through and put in the tmp...
Back
Top Bottom