Hello,
I am looking to use DLookup to put values in to textboxes using VBA, can I do something like this please:
I have also tried:
I have also tried DLookup in another textbox and coping the data to an unbound textbox to then add or edit then save on lose focus.
I am looking to be able to lookup the data for the textbox, edit it and then save is using a RunSQL command After the textbox Loses Focus. The Data will depend upon the date selected. I'm trying to avoid the page being linked to a query because it is part of a multi user system and I have a couple of different scenarios to use this with different type of queries.
Thank you,
Malcolm
I am looking to use DLookup to put values in to textboxes using VBA, can I do something like this please:
Code:
Me!subfrmDiary.txtManagerDiary.Value = DLookup("ManagerDiary", "tbl_Net_Diary", "TheDate = Forms.frmBackground.txtLocalSystemDate")
I have also tried:
Code:
Forms.frmBackground.subfrmDiary.txtManagerDiary = DLookup("ManagerDiary", "tbl_Net_Diary", "TheDate = Forms.frmBackground.txtLocalSystemDate")
Forms.frmBackground.subfrmDiary.txtManagerDiary.Value = DLookup("ManagerDiary", "tbl_Net_Diary", "TheDate = Forms.frmBackground.txtLocalSystemDate")
Forms!frmBackground!subfrmDiary!txtManagerDiary.Value = DLookup("ManagerDiary", "tbl_Net_Diary", "TheDate = Forms.frmBackground.txtLocalSystemDate")
Forms!frmBackground!subfrmDiary.txtManagerDiary.Value = DLookup("ManagerDiary", "tbl_Net_Diary", "TheDate = Forms.frmBackground.txtLocalSystemDate")
I have also tried DLookup in another textbox and coping the data to an unbound textbox to then add or edit then save on lose focus.
I am looking to be able to lookup the data for the textbox, edit it and then save is using a RunSQL command After the textbox Loses Focus. The Data will depend upon the date selected. I'm trying to avoid the page being linked to a query because it is part of a multi user system and I have a couple of different scenarios to use this with different type of queries.
Thank you,
Malcolm