Using default value in form property if other form not open

Jan van Bekkum

Registered User.
Local time
Today, 23:58
Joined
Feb 25, 2010
Messages
23
I want to fill a property in a form with [Forms]![Opportunities]![Proposals].[Form]![SalesForceNumber] if the [Proposals] form is open and with 0 otherwise. Setting a default value for the property works well if the form is open, but I get (of course) #Name? if the form is not open. How can I enter 0 as default value for the property in that situation?
 
Use the current event of the form, test for NewRecord, use IsLoaded to test to see if the other form is open, and an If/Then block to set the value appropriately.
 

Users who are viewing this thread

Back
Top Bottom