Hi All,
I'm somewhat of a beginner when it comes to VBA, and I don't even know if I need VBA for this one. I have a form that contains three fields, LASTINSPECTIONDATE, FREQUENCYOFINSPECTION, and NEXTINSPECTIONDATE. The FREQUENCYOFINSPECTION is a combo box containing only three choices; "one", "two", or "three". The user will enter the date into the LASTINSPECTIONDATE field, and decide on the frequency of inspections (this is per year). I am trying to get the NEXTINSPECTIONDATE to auto populate based on the date entered into the LASTINSPECTIONDATE, and the FREQUENCYOFINSPECTION field. For example, if the user enters 1/1/14 in the LASTINSPECTIONDATE, and the frequency is set to two, the NEXTINSPECTIONDATE would populate with 6/1/14. If the frequency was set to one, it would populate 1/1/15. I have tried the IIF statement, and tried inserting the DateSerial function within the IIF statement, but it just returns the actual DateSerial string, and does not calculate it. Any help would be appreciated.
I'm somewhat of a beginner when it comes to VBA, and I don't even know if I need VBA for this one. I have a form that contains three fields, LASTINSPECTIONDATE, FREQUENCYOFINSPECTION, and NEXTINSPECTIONDATE. The FREQUENCYOFINSPECTION is a combo box containing only three choices; "one", "two", or "three". The user will enter the date into the LASTINSPECTIONDATE field, and decide on the frequency of inspections (this is per year). I am trying to get the NEXTINSPECTIONDATE to auto populate based on the date entered into the LASTINSPECTIONDATE, and the FREQUENCYOFINSPECTION field. For example, if the user enters 1/1/14 in the LASTINSPECTIONDATE, and the frequency is set to two, the NEXTINSPECTIONDATE would populate with 6/1/14. If the frequency was set to one, it would populate 1/1/15. I have tried the IIF statement, and tried inserting the DateSerial function within the IIF statement, but it just returns the actual DateSerial string, and does not calculate it. Any help would be appreciated.