A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Default value of the field



 
 
Thread Tools Display Modes
  #1  
Old March 14th, 2005, 08:58 PM
ljubo lecic via AccessMonster.com
external usenet poster
 
Posts: n/a
Default Default value of the field

Is it possible to define the default value for the field
in the table design to be the value of the field from another table.
(Dynamicaly defined default value)
I tried to write the subquery in the expression builder
but have some syntax errors.
Whereas I am not very familiar with the expression builder I need help.
Thanks in advance!

--
Message posted via http://www.accessmonster.com
  #2  
Old March 14th, 2005, 11:29 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default

You can't do this in a table design. You can do this in a form.

--
Duane Hookom
MS Access MVP
--

"ljubo lecic via AccessMonster.com" wrote in
message news:524b6f1966574d09b3eb32239c060ee7@AccessMonste r.com...
Is it possible to define the default value for the field
in the table design to be the value of the field from another table.
(Dynamicaly defined default value)
I tried to write the subquery in the expression builder
but have some syntax errors.
Whereas I am not very familiar with the expression builder I need help.
Thanks in advance!

--
Message posted via http://www.accessmonster.com



  #3  
Old March 14th, 2005, 11:52 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Mon, 14 Mar 2005 19:58:10 GMT, "ljubo lecic via AccessMonster.com"
wrote:

Is it possible to define the default value for the field
in the table design to be the value of the field from another table.


No. This violates relational principles and is therefore not
available.

You can set the Default property of a control in a Form (the form you
should be using to enter data into your table) to a DLookUp()
expression retrieving a value from a table, but you can't do it in the
table properties.

John W. Vinson[MVP]
  #4  
Old March 15th, 2005, 12:09 AM
ljubo lecic via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

Thank you very much!

--
Message posted via http://www.accessmonster.com
  #5  
Old March 15th, 2005, 11:53 AM
Jamie Collins
external usenet poster
 
Posts: n/a
Default


John Vinson wrote:
You can set the Default property of a control in a Form (the form you
should be using to enter data into your table) to a DLookUp()
expression retrieving a value from a table, but you can't do it in

the
table properties.


A front end application should not relied upon in place of constraints
in the database layer to maintain data integrity. A CHECK constraint to
reference other tables could be included in the table definition.

Jamie.

--

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DCount compare table.textfield to form.text field question RNUSZ@OKDPS Using Forms 1 March 11th, 2005 03:05 AM
Setting default value in textbox field on form Christian Using Forms 5 January 16th, 2005 08:13 AM
Prevent Blank Records being written. Need Help. Robert Nusz @ DPS Using Forms 4 December 29th, 2004 06:15 PM
NUMBERING the pages Bob New Users 7 June 14th, 2004 12:20 AM
Contact Default Field View dmahanay Contacts 0 May 22nd, 2004 12:47 PM


All times are GMT +1. The time now is 02:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.