I have a masterform "kg" and a subform "kg varelinjer" (order and order details in english)
In the subform i have a field named "lagerbeholdning" (storage quantity) and my problem is that i need to make a button for users which updates this field with data from another tabel on demand.
I have tried to make some code myself
Expand|Select|Wrap|Line Numbers
- Do While Not [Form_kg varelinjer].NewRecord
- [Form_kg varelinjer].Lagbeholdning.SetFocus
- [Form_kg varelinjer].Lagbeholdning = DLookup("lagerbeholdning", "tbl lpst00pf tdo", "varenr=" & [Form_kg varelinjer].Varenr)
- DoCmd.GoToRecord , , acNext
- Loop
I need this code
Expand|Select|Wrap|Line Numbers
- [Form_kg varelinjer].Lagbeholdning = DLookup("lagerbeholdning", "tbl lpst00pf tdo", "varenr=" & [Form_kg varelinjer].Varenr)
The reason for this is because it is very important to just update the field "lagerbeholdning" at the right time because of some fluctuating storage quantities..
Please help my find a solution