Search results

  1. B

    New Record Validate

    Hi folks, any help with this would be much appreciated :) Brucey
  2. B

    New Record Validate

    Hi folks, I’m trying to do the following; If a new record is created, insert date only if customerID is not null Private Sub Form_Current() If "CustomerID", "TblDietPlan" = <> 0 Then If Me.NewRecord Then Me.MealDate = DMax("MealDate", "TblDietPlan") End Sub
  3. B

    Combo box

    Thanks it worked
  4. B

    Combo box

    Hi folks, I am using combo box to filter records from a form. The data source for the form is from a query. I use the combo box within the query to filter the data, I would like the form to refresh/ run the query again every time a new selection is made from the combo box. Any help would be...
  5. B

    VBA Validation

    Hi Paul, it worked great, thanks, changing the subject here, when you create a form and click on a new record, the form create a new record, easy peasy lemon squeezy But what if you had to write the sql code yourself, do you have an example of this or a link to a good tutorial, thanks again...
  6. B

    VBA Validation

    Hi Paul, this is a bit of a weird one, basically they is a TblDietPlan and TblRestaurant. I’m trying to check if the restaurant has not already reordered by checking if the Restaurant date does not exist in the TblDietPlan already. The code works ok but if I change the name of the restaurant...
  7. B

    VBA Validation

    Paul having a wee problem, I have number of restaurants so If Me.ComboSelectRestaurant = 'Watersidel' Then Yep this is will work, and will allow the order query to run and reorder the stock, if the txtCusDate does not exist in the order table, however if the Restaurant name changes and I need...
  8. B

    VBA Validation

    Just what I was looking for, cheers Paul
  9. B

    VBA Validation

    Hi folks, changing my code slightly to take into account a combo selection on a form, but it is not working! Basically trying to validate if the order query has been executed by checking if the date And Restaurant name selected has been already added to the order table. If DCount("*"...
  10. B

    Retails & Products

    Retailers & Products Hi folks, I am designing a database that will hold many products from a variety of suppliers. The problem is that most of the products are the same i.e. I am entering the same products details in the product table 100 times or more from different suppliers. The only...
  11. B

    DBA Code - Identify if 2 fields within a table have been populated

    Thank you TJpoorman, it work :)
  12. B

    DBA Code - Identify if 2 fields within a table have been populated

    Hi TJpoorman, thank you very much it worked :)
  13. B

    DBA Code - Identify if 2 fields within a table have been populated

    it work ok if I use the following code; If DCount("*", "TblDietPlan", "[MealDate] = " & Format(txtCusDate, "\#mm\/dd\/yyyy\#")) <> 0 The
  14. B

    DBA Code - Identify if 2 fields within a table have been populated

    Hi David, will try your suggestion, the txtCusDate is indeed a textbox on a form. thanks
  15. B

    DBA Code - Identify if 2 fields within a table have been populated

    tblDietPlan • DietPlanID • RestaurantFK • MealDate • MorningDiet • AfternoonDiet • EveningDiet tblRestaurant • RestaurantID • Restaurant • Location • Forename • Surname Query • MealDate • Restaurant
  16. B

    DBA Code - Identify if 2 fields within a table have been populated

    Hi David, still having the same problem, same error message and it keeps highlighting the field Restaurant, any ideas? Error message - Expected: list separator or ) If DCount("*", "QryPrintDataVBA", "[MealDate] = " & Format(txtCusDate, "\#mm\/dd\/yyyy\#") & " AND [Restaurant] = " “Waterside")...
  17. B

    DBA Code - Identify if 2 fields within a table have been populated

    Thanks David, I will give it a go. Brucey54
  18. B

    DBA Code - Identify if 2 fields within a table have been populated

    The error seems to be focus round TblRestaurant Error message - Expected: list separator or ) If DCount("*", "TblDietPlan", "[MealDate] = " & Format(txtCusDate, "\#mm\/dd\/yyyy\#") & " AND "TblRestaurant ", "[ Restaurant] = "Waterside") <> 0 Then
  19. B

    DBA Code - Identify if 2 fields within a table have been populated

    Hi, it’s a one too many relationship i.e. The tblRestaurant can have many tblDietPlans The tblDietplans can only have one tblRestaurant
  20. B

    DBA Code - Identify if 2 fields within a table have been populated

    Hi TJPoorman, still not working, I have 2 table tblReOrderDate with the field [ReOrderDate] and another table tblRestaurant with the field [Restaurant] If DCount("*", "TblDietPlan", "[MealDate] = " & Format(txtCusDate, "\#mm\/dd\/yyyy\#") & " AND [Restaurant] = " “Waterside") <> 0 Then Any...
Back
Top Bottom