Hello
I am attempting to populate a textbox in my form with the DLookup function with multiple criteria. The purpose is to show how many appointments matches an appointment time, warehouse, product, and appointment day (hence the multiple criteria). The code I use is
txttime1.Value = DLookup(Master.APPT_TIME, Master, Master.APPT_TIME = Form_OrderUpdate.APPTTIME And Master.APPT_DATE = Form_OrderUpdate.APPTDATE And Master.WHSE = Form_OrderUpdate.WHSE And Master.BUISNESS = Form_OrderUpdate.BUISNESS)
Master is where the data is stored. However, when I run this it keeps telling me that Master is an undefined variable and it leaves me confused since its the name of my Table. Am I missing something here? Thanks for any help!
I am attempting to populate a textbox in my form with the DLookup function with multiple criteria. The purpose is to show how many appointments matches an appointment time, warehouse, product, and appointment day (hence the multiple criteria). The code I use is
txttime1.Value = DLookup(Master.APPT_TIME, Master, Master.APPT_TIME = Form_OrderUpdate.APPTTIME And Master.APPT_DATE = Form_OrderUpdate.APPTDATE And Master.WHSE = Form_OrderUpdate.WHSE And Master.BUISNESS = Form_OrderUpdate.BUISNESS)
Master is where the data is stored. However, when I run this it keeps telling me that Master is an undefined variable and it leaves me confused since its the name of my Table. Am I missing something here? Thanks for any help!