Search results

  1. B

    Subform creating orphan records

    Hi folks, this is my code so far, I still have the system error message still popping up after my message, would like to stop this i.e. “You must enter a value in the bla bla field” '------------------------------------------------------------ ' mcrMainformMsgBox '...
  2. B

    Subform creating orphan records

    eh I created Macro to display the message, don't really know vba any help much appreciated :)
  3. B

    Subform creating orphan records

    Hi folks, I have managed to display my own message by using the On Error event on the subform as suggested by spikepl. But after my message pops-up a second message pops-up i.e. “You must enter a value in the bla bla field” how do I stop this message from displaying?
  4. B

    Subform creating orphan records

    You always get a error message if the user fills in the subform first before the main form and you have the foreign key set to required....
  5. B

    Subform creating orphan records

    Hi folks, how do I display a more meaningful message instead of the cryptic error about having to enter data into blah blah blah. How can I trap that error and provide them a more meaningful message about entering data. I have tried the following; Main form name frmPatientRecords Sub form name...
  6. B

    Query & Textbox

    it's ok folks got it to work =DLookUp("[MealDate]","Qry_2_DateNewPatients")
  7. B

    Query & Textbox

    Code still not working =DCount("*","Qry_2_DateNewPatients","[MealDate] = " & Format([txtCusDate],"\#dd\/mm\/yyyy\#"))
  8. B

    Query & Textbox

    Code still not working =DCount("[MealDate]","Qry_2_DateNewPatients"='DMAX')
  9. B

    Query & Textbox

    This is the code I have so far, tying to find the max date =DCount("[MealDate]","Qry_2_DateNewPatients"='MAX' not working
  10. B

    Query & Textbox

    Hi folks, quick question I have textbox on a form. I also have a query that displays a date, I would like this date to be displayed within the textbox, not sure how to do this, thanks in advance.
  11. B

    Concatenate 3 queries to 1

    Also tried the following, giving me a -1 Snack: IIf([Qry_07_MorningLabelsCusLabel]![MorningSnack],"MorningSnack") And IIf([Qry_08_AfternoonLabelsCusLabel]![AfternoonSnack],"AfternoonSnack") And IIf([Qry_09_EveningLabelsCusLabel]![EveningSnack],"EveningSnack")
  12. B

    Concatenate 3 queries to 1

    if statement producing -1 for morning labels, what have I done wrong, it’s been a while since I’ve used a if statement! Snack: IIf([Qry_07_MorningLabelsCusLabel]![MorningSnack],1,0) And IIf([Qry_08_AfternoonLabelsCusLabel]![AfternoonSnack],2,0)
  13. B

    Concatenate 3 queries to 1

    Hi Plog, I understand this part (if [Meal Period]='Morning', 1; if [Meal Period]='Afternoon', 2;, etc.). Then use that query as the source of your report. But how do you output 1 as Morning meal, 2 as Afternoon meal, 3 as Evening meal on the report side?
  14. B

    Concatenate 3 queries to 1

    Hi folks, need some help with queries & reports, I have 3 queries; QryMorning_label QryAfternoon_label QryEvening_label And then have 3 reports; Morning_Report_labels Afternnon_Report_labels Evening_Reoprt_labels I need to print all the reports as 1 report to save on labels i.e. when...
  15. B

    Data validation

    Hi gemma-the-husky, your code is working ok now, but still receiving the same issue....
  16. B

    Data validation

    Hi Namliam, my understanding is; if DCount not = 0, this would mean that a date and a hospital name exists already within the query! So no need to Reorder diets for that kitchen, just print the labels! Is my understanding wrong?
  17. B

    Data validation

    Hi gemma-the-husky, I'm receiving error next to the "),0) of your code, If I swap the if else statement round it works ok, need to figure a way round to stop the re-order of the diets if someone hits the print button twice...
  18. B

    Data validation

    If I swap the if else statement round this would work, but if someone from one of the kitchens hits the print button twice, the code will re-order the diets twice. Producing double the labels for that kitchen, this would also affect the stocktake, is there a way to stop this from happen?
  19. B

    Data validation

    Do you think I have if else statement mixed up? If (DCount("*", "QryPrintDataVBA", "[MealDate] = " & Format(txtCusDate, "\#mm\/dd\/yyyy\#") & _ " AND [Hospital] = '" & Me.ComboSelectHospital & "'") <> 0) Then 'A date provided exists in the...
  20. B

    Data validation

    How do I amend this code to do the following; If date entered AND hospital name selected from the dropdown list is not within the query Then Do this Else Do this Code If (DCount("*", "QryPrintDataVBA", "[MealDate] = " & Format(txtCusDate, "\#mm\/dd\/yyyy\#") & _...
Back
Top Bottom