Re: Using Left Function in table design.
- From: Wayne Gillespie <bestfit@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 25 Jan 2006 10:46:17 GMT
On 25 Jan 2006 01:58:32 -0800, "Jason" <wills.jason@xxxxxxxxx> wrote:
>I am trying to create a simple database, but it's proving too complex
>for me!!!
>I have only just started a new database and am trying to have two
>fields in a table:
>the first holding the first name of a person (FirstName) and the second
>to be the first charactrer of that name.
>
>i am using the default value property for the second field of
>"=Left([FirstName],1)", but i am getting error messages when tryign to
>save it.
>
>does anyone know what i am doing wrong, i would like it so that the
>first could be entered as "Jason" and the second field would
>automatically enter "J".
>
>can anyone helps, thanks
>
>Jason
You can't set a calculated default value like this in a table.
However from your description, there is no need to have the 2nd field in the table to store the first letter of the
first name. This value can be calculated whenever needed using the same formula you are attempting to set with the
default value.
=Left([FirstName],1)
In any form or report where you need to display the first letter, use this formula as the controlsource of a textbox.
Basic rule of database design - you *normally* do not store in a table that which can be calculated from existing data.
Wayne Gillespie
Gosford NSW Australia
.
- References:
- Using Left Function in table design.
- From: Jason
- Using Left Function in table design.
- Prev by Date: Re: auto number by category?
- Next by Date: Re: Regional options: how to change from VB
- Previous by thread: Using Left Function in table design.
- Next by thread: Re: Using Left Function in table design.
- Index(es):
Relevant Pages
|