HI Guys,
I have a form and using dlookup functions to populate the form but the data was not save in table.
The link table where I fetch the data is a dynamic table it change every day.
Appreciate your response on this
HI Guys,
I have a form and using dlookup functions to populate the form but the data was not save in table.
The link table where I fetch the data is a dynamic table it change every day.
Appreciate your response on this
I did not download your db but does the DLookup work on your form? Is the control you are using it for a bound control?
Yes Dlookup is working on my form
Yes is a bound control
Can you post your DLookup Code? And what event is the code firing under?
This is one of the control of the form
Control Source:
=DLookUp("Field28","OpenPOLines","Field1='" & [LotNumber] & "'")
AfterUpdate
Me.CommodityType = Dlookup ("Field28","OpenPOLines","Field1='" & Me.[LotNumber] & "'")
Can't make sense of that. I see someone has downloaded your db anyway!
Good Luck With Your Project.
Thanks for your time
Sorry, but if the Control Source is
=DLookUp("Field28","OpenPOLines","Field1='" & [LotNumber] & "'")
the Control is not Bound! For it to be a Bound Control the Control Source has to be a Field in the Form's underlying Table or Query, not a DLookup()!
You need to Bind the Control to the appropriate Field, using the Control Source, and run the DLookup elsewhere, in an appropriate event.
Linq ;0)>
Sorry, but if the Control Source is
=DLookUp("Field28","OpenPOLines","Field1='" & [LotNumber] & "'")
the Control is not Bound! For it to be a Bound Control the Control Source has to be a Field in the Form's underlying Table or Query, not a DLookup()!
You need to Bind the Control to the appropriate Field, using the Control Source, and run the DLookup elsewhere, in an appropriate event.
Linq ;0)>
Ok now I understand.
First:
Control source must contain the filed in the forms.
example: Name: LotNumber; Control Source: LotNumber
Second:
How to bind?
Example I will used the Afterupdate of Remarks
Private Sub Remarks_AfterUpdate()
Me.Remarks = DLookup("F2", "OpenSOLines", "F1='" & Me.LotNumber & "'")
End Sub
Is this correct?