Form – Textbox data to table field

gsandy

Registered User.
Local time
Tomorrow, 02:48
Joined
May 4, 2014
Messages
104
I have form (frmHour_Enter) that has a textbox (Hour_Rate) which has the Control Source with a DLookUp to find data on another table. The form (frmHour_Enter) is based on a table (tblHour_Enter) and this table has a field (Hour_Rate).
The form finds the DLookUp data OK and it appears in the textbox (Hour_Rate). But this data is not being transferred/entered in the field (Hour_Rate) in the table (tblHour_Enter). How can I get this to happen?



Thanks Sandy.
 
You can't do it on this way, you must change the Control Source to the field in the table.
You can run the DLookUp from an "After Update" event when one of the other controls/fields update, and then insert the value in the control/field.
Code:
Private Sub .... _AfterUpdate()
  Me.[TheControlName] = DLookup.... 
End Sub
 
Thanks JHB, that was the clue I was looking for. Cheers Sandy
 

Users who are viewing this thread

Back
Top Bottom