[AccessD] Setting default value of a text box

Stuart McLachlan stuart at lexacorp.com.pg
Wed Apr 3 02:00:09 CDT 2013


???

I frequently set default values to expressions such as

=Date()
or
=DMax("InvoiceNumber","tblInvoices") + 1


-- 
Stuart

On 2 Apr 2013 at 23:23, Charlotte Foust wrote:

> Doesn't work that way.  Default Value has to be set as a value, not an
> expression.
> 
> Charlotte
> 
> 
> On Tue, Apr 2, 2013 at 2:18 PM, Kaup, Chester <Chester_Kaup at kindermorgan.com
> > wrote:
> 
> > The IFF statement is in the default value property setting of the text box
> > names invoice number.
> >
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com [mailto:
> > accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
> > Sent: Tuesday, April 02, 2013 3:35 PM
> > To: Access Developers discussion and problem solving
> > Subject: Re: [AccessD] Setting default value of a text box
> >
> > Where is the code now?  What event?
> >
> > Charlotte
> >
> >
> > On Tue, Apr 2, 2013 at 7:49 AM, Kaup, Chester <
> > Chester_Kaup at kindermorgan.com
> > > wrote:
> >
> > > I have a data entry form. The first entry is a list box where the user
> > > selects a company name. List box name is companyname. The next data
> > > entry is an invoice number. I am trying to set the default value
> > > property of the text box using the following statement. The default
> > > value is not becoming part of the saved data. Thanks for the help
> > >
> > > =IIf([CompanyName].[Value]="Renegade","RWLS",Null)
> > >
> > > I also tried
> > > =IIf([CompanyName]="Renegade","RWLS",Null)
> > >
> > > Do I maybe need to set it using code in the after update event of the
> > > list box?
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > http://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list