Link to home
Start Free TrialLog in
Avatar of cocacola
cocacola

asked on

Linked MS-SQL Table and lost default values

I have a DB in MS-SQL. Some fields in my table as default values.

When I link my table in MSAccess, I don't see the default values of the fields.

What can I do to see the default values in MSAccess.

Thank you
Avatar of nico5038
nico5038
Flag of Netherlands image

The setting of the defaultvalue needs to be in MS SQL, as that's the location where you're real data is stored.
Just use a stored procedure to initialize your default value there.

Nic;o)
Avatar of cocacola
cocacola

ASKER

In MSAccess, if a table is empty and you select all rows from it, you will have one empty row with default values on specific fields.

In MSAccess with a table linked from MSSQL, if a table is empty and you select all rows from it, you will have one empty row with blank fields ... no default values.

That`s my problem because I have a screen who is already dealing with an empty row from a MSAccess table (form controls initialises with default value of recordset).  But if I change MSAccess table for a linked table from MS-SQL I have an error because no value on empty recordset on the same screen.


Maybe there`s no answer to that and you cant use default values of MS-SQL in MSAccess.  If so, I will have to fix the codes on my MSAccess application.
In MSAccess, if a table is empty and you select all rows from it, you will have one empty row with default values on specific fields.

In MSAccess with a table linked from MSSQL, if a table is empty and you select all rows from it, you will have one empty row with blank fields ... no default values.

That`s my problem because I have a screen who is already dealing with an empty row from a MSAccess table (form controls initialises with default value of recordset).  But if I change MSAccess table for a linked table from MS-SQL I have an error because no value on empty recordset on the same screen.


Maybe there`s no answer to that and you cant use default values of MS-SQL in MSAccess.  If so, I will have to fix the codes on my MSAccess application.
Besides the default value setting in the table, you can also set them when displayed on a field.
These settings can differ from the table settings.
These however won't work on the "bare" tables, but they will work on bot "normal" and datasheet forms.
I guess the origin of the row doesn't bother there.

Nic;o)

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
 - PAQ'd and pts refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
ASKER CERTIFIED SOLUTION
Avatar of Jgould
Jgould

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial