Hello guys!
I have a masterform "kg" and a subform "kg varelinjer" (order and order details in english)
In the subform i have a field named "lagerbeholdnin g" (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
But this code does not work.
I need this code
to update several records in my subform by a button on the mainform.
The reason for this is because it is very important to just update the field "lagerbeholdnin g" at the right time because of some fluctuating storage quantities..
Please help my find a solution
I have a masterform "kg" and a subform "kg varelinjer" (order and order details in english)
In the subform i have a field named "lagerbeholdnin g" (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
Code:
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
Code:
[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 "lagerbeholdnin g" at the right time because of some fluctuating storage quantities..
Please help my find a solution
Comment