Search results

  1. L

    Can't filter my cross query with a form variable or temp variable.

    I used the function in the query and it worked for loop 1 but not for loop two. Funny thing is that if I just put the number 2 in the criteria for the query it works. Not sure why this is so difficult to obtain.
  2. L

    Can't filter my cross query with a form variable or temp variable.

    So I'll try to explain this better. I have some reports that I need by the loop (12-week cycle). I have a form where you can select which loop you want. I have a function tied to the combo box where the loop number is which is being pulled from a table. Here is the function I used. Function...
  3. L

    Crosstab query problem

    Thanks, but bastanu's suggestion did the trick.
  4. L

    Crosstab query problem

    Thanks a bunch, that was easy.
  5. L

    Crosstab query problem

    I have a couple of crosstab queries for days of the week. My problem is that if, say week 2, has no data. The report doesn't recognize the field and the report doesn't print. I am making the crosstab query off another query that gets all the records that have a type of "personal" and where...
  6. L

    Can't filter my cross query with a form variable or temp variable.

    So in my program, every twelve weeks is a loop. The function I made is to grab which loop is being accessed for the report. I have a function for the user id which works perfectly, but the one I created for the loop doesn't work when you switch from loop 1 to loop 2, only works for the first...
  7. L

    Can't filter my cross query with a form variable or temp variable.

    I just tried to make a global variable and use that and it worked. I did it earlier and it didn't work. Strange. Thanks!
  8. L

    Can't filter my cross query with a form variable or temp variable.

    TRANSFORM First(IIf([qrptReversalDietByWeek]![IncludedInDiet],"X","")) AS IncludedInDiet SELECT qrptReversalDietByWeek.UserIDFK, qrptReversalDietByWeek.Loop, qrptReversalDietByWeek.FoodGroupID, qrptReversalDietByWeek.FoodGroup, qrptReversalDietByWeek.AlwaysInclude FROM qrptReversalDietByWeek...
  9. L

    Can't filter my cross query with a form variable or temp variable.

    It works when I just put the number to filter, but I need to pull it from somewhere else.
  10. L

    Can't filter my cross query with a form variable or temp variable.

    Hi, I have a report with 3 subforms all need to be filtered by the value on a field in the main report. I tried to filter the queries, but it keeps saying it doesn't recognize the forms value or temp var value. I'm lost, any suggestions?
  11. L

    Copying data from a table and putting it back in the same table

    I would but I have to go by the meal category and change them with that criteria. That would be nice if they were all the same, but they are different for each meal. Thanks again!
  12. L

    Copying data from a table and putting it back in the same table

    I actually meant the WeeklyPlanID. I got it to work, but now I have to update all the ActionPerWeeklyPlanIDFK values to the ones for the new Plan week. I should be able to do that with a few update statements unless you have a better suggestion. Here's the code I ended up with for the append...
  13. L

    Copying data from a table and putting it back in the same table

    I'm getting the zero because I'm not appending that field. If I did it would be the same Plan ID from the previous week and I need it to be the new plan Id. This is where the problem is.
  14. L

    Copying data from a table and putting it back in the same table

    Most of them. To explain exactly what I'm doing. The program creates weekly meal plans. After the first week, I want to copy the previous week's data. I have an append query but I'm not sure how to replace the MealDate with the MealDate + 7 days, and the plan Id needs to be replace with the...
  15. L

    Copying data from a table and putting it back in the same table

    Hi, I could use some advice on this one. I have to copy all the data from one form for a certain Meal Plan and put it back into the same table with a different Plan ID. I was trying to use an append query, but am having some trouble. I have the plan id saved into a temp var called...
  16. L

    DLookup with three criteria

    I got it. Just played around with it some more. Ended up with this. DLookup("[WeeklyPlanID]", "tblWeeklyPlans", "[UserID] = " & Me.txtUserID & " AND [Loop] = " & loopNum & " AND [WeekNumber] = " & weekNum) Thanks anyway!
  17. L

    DLookup with three criteria

    I use a Dim statement and they are set to Integer
  18. L

    DLookup with three criteria

    Can someone tell me what's wrong with this? These are so confusing. I never know when to put the quotes and when not to. DLookup("[WeeklyPlanID]", "tblWeeklyPlans", "[UserID] = " & Me.txtUserID & " AND [Loop] = '" & loopNum & "' AND [WeekNumber] = '" & weekNum & "'") I'm getting a data type...
  19. L

    Requery a Combo Box from another form

    I have a form that adds a measurement to the measurement table ie: cup, oz. When I close the form I am trying to requery the combo box on another form. Here's what doesn't work. [Forms]![frmMealComponents].Controls![cboMeasure].Requery I also wanted to query the subform and it's not letting...
  20. L

    DSum with three criteria

    That's what I thought, I must have looked at the calculations wrong. Sorry! You'll be seeing a response from my other post as soon as I get this DB cut down a little. Thanks again!
Back
Top Bottom