By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,164 Members | 1,019 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,164 IT Pros & Developers. It's quick & easy.

how to set a condiitonal default value of a table field

P: 17
Can we use expression in default value for a table field for example

IIf(Table-1.field-1=table-2 . field-1, table-1.field-2, 0)

Interpretation If field-1 of table -1 is like/equal to field-2 of table-2 then value of field-1 of table-1 will be the default value other wise 0 will be the default value

Can I use this type of conditional default value if yes please tell me how. I tried to set this expression in default property of a table field. I do not want to use this in a calculated field in query but only in a table.

Please tell me a way to do this
Nov 28 '06 #1
Share this Question
Share on Google+
2 Replies


NeoPa
Expert Mod 15k+
P: 31,660
I don't believe this is possible :(.
Nov 28 '06 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
Can we use expression in default value for a table field for example

IIf(Table-1.field-1=table-2 . field-1, table-1.field-2, 0)

Interpretation If field-1 of table -1 is like/equal to field-2 of table-2 then value of field-1 of table-1 will be the default value other wise 0 will be the default value

Can I use this type of conditional default value if yes please tell me how. I tried to set this expression in default property of a table field. I do not want to use this in a calculated field in query but only in a table.

Please tell me a way to do this
You can't set it as default value in a table field. However, you could use it as default value in the control of a form as long as the query being used as record source of the form contained both tables and the relevant fields.
Nov 28 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.