Search results

  1. 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...
  2. 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...
  3. 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!
  4. 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...
  5. 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.
  6. 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?
  7. 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!
  8. 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...
  9. 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.
  10. 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...
  11. 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...
  12. 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!
  13. L

    DLookup with three criteria

    I use a Dim statement and they are set to Integer
  14. 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...
  15. 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...
  16. 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!
  17. L

    DSum with three criteria

    Hello, could someone tell me what I did wrong here. These statements are a bit tricky with the syntax. It was working once and I forgot to save it and now I can't get it to work again. I'm probably just overlooking something simple. Here is the code...
  18. L

    How to requery a listbox that is using a row source

    I'm not sure I can get the size down. What is the limit? Right now it's at 3,843 KB zipped.
  19. L

    How to requery a listbox that is using a row source

    I checked and the calculations are going through. strCriteria is getting the proper values.
  20. L

    How to requery a listbox that is using a row source

    Yes, I have and it seems to be hitting an error on "Me.Filter = strCriteria". The row source is a query. The SQL for the query is SELECT tblActionsPerWeeklyPlan.ActionsPerWeeklyPlanID, tblActions.Action AS Meal, Format([StartTime],"h:nn AM/PM") AS [Time], tblChallenges.ChallengeDate AS [Meal...
Back
Top Bottom