Locopete99
Registered User.
- Local time
- Today, 12:13
- Joined
- Jul 11, 2016
- Messages
- 163
Hi Guys,
Need some help.
I have attached a picture of a form I'm working on. The form has two query subforms embedded in it. The top subform shows things that have an action required date of <= today.
The bottom has things that have a required action date of > today.
Clicking on either of these populates the main form using the ID number into ID (text2 on the form) and the rest are done by dlookups.
This was the only way I could find to do this. I have 3 fields with an update button next to them, these just open a new form linked directly to the table to update required fields.
The problem comes when i need to update the main form after updating one of these links.
I have tried requery, refresh and also running the code again but cannot find a way to refresh the dlookup results.
Can anyone offer any ideas?
Need some help.
I have attached a picture of a form I'm working on. The form has two query subforms embedded in it. The top subform shows things that have an action required date of <= today.
The bottom has things that have a required action date of > today.
Clicking on either of these populates the main form using the ID number into ID (text2 on the form) and the rest are done by dlookups.
Code:
Forms!frm_mdtd!Text2 = Me.Id
Forms!frm_mdtd!Text4 = DLookup("CustNo", "Tbl_debt1", "ID=" & Me.Id)
Forms!frm_mdtd!Text6 = DLookup("CustName", "Tbl_debt1", "ID=" & Me.Id)
Forms!frm_mdtd!Text8 = DLookup("Type", "Tbl_aged", "ID=" & Me.Type)
Forms!frm_mdtd!Text10 = DLookup("Responsible", "Tbl_debt1", "ID=" & Me.Id)
Forms!frm_mdtd!Text12 = DLookup("Start", "Tbl_debt1", "ID=" & Me.Id)
Forms!frm_mdtd!Text14 = DLookup("Completed", "Tbl_debt1", "ID=" & Me.Id)
Forms!frm_mdtd!Text16 = DLookup("Notes", "Tbl_debt1", "ID=" & Me.Id)
Forms!frm_mdtd!Text26 = DLookup("NSA", "Tbl_debt1", "ID=" & Me.Id)
Forms!frm_mdtd!Text36 = DLookup("Contact", "Tbl_debt1", "ID=" & Me.Id)
Forms!frm_mdtd!Text38 = DLookup("Number", "Tbl_debt1", "ID=" & Me.Id)
This was the only way I could find to do this. I have 3 fields with an update button next to them, these just open a new form linked directly to the table to update required fields.
The problem comes when i need to update the main form after updating one of these links.
I have tried requery, refresh and also running the code again but cannot find a way to refresh the dlookup results.
Can anyone offer any ideas?