Update data when form opens

herby_one

Registered User.
Local time
Today, 12:54
Joined
Sep 30, 2004
Messages
22
Hi,
I have a form for entering a new communication. I've set the default property for the Landlord_ID field to update automatically with the following line:
=[Forms]![frmNewLandlord]![Landlord_ID]

However I need to open the new communication from two different forms. And depending on which form opens the new comm form I want the landlord_ID field to be updated accordingly.
Does anyone know how I can change this default value line, eg. from [frmNewLandlord] to [frmLookup_Landlord].
 
Hi. Instead of using a default value, you can set the value using the form you use to open the new form like

docmd.open acform blah
Forms!Blah!Blah = Your value

That way, each form that opens it can set the value accordingly.
 
thanks

thanks Blorf, worked fine. Appreciate your help.
 

Users who are viewing this thread

Back
Top Bottom