When I set a default value in SQL Server (using Enterprise Manager), that value is not the default value in Access when I link the tables. Any suggestions?
I believe that the SQL Server default value is not sent to Access when a table is linked. SQL Server adds the default value upon insert of a row into a table. It isn't necessary for Access to "know" the default value. Terry L. Broadbent - DBA
Computing Links:
But I realy need that default value in access, else the front-end program doesn't work, and I don't have the time to make a new front-end for it. So isn't there any possibility to use a default value?
I think what Terry is saying is that if you dont specify a value for the field then SQLserver will add the default and it will then be visible in the linked table in Access and thus you can use it, should not be a problem.
I checked it out and it inserts the default value indeed. The problem is that it's inserted to late, isn't there a possibility to insert it before the fields are entered?
If I use the same table in access with a default value, the default value is displayed when I insert a new empty row.
The problem is that my customers access program gives an error when it's not inserted in advance.
It might just be a refresh thing, on one of the form events (e.g. after insert) add a me.refresh and or me.requery to get the data on the form
alternatively possibly think about a double insert... the first insert is done in the background with just your key field(s) then do an update on that record to update the other fields
You could code the default value into your Access forms or simply require user input. It doesn't seem that you want to modify the front-end but if you need the default value in the front-end some modifications will be required. Terry L. Broadbent - DBA
Computing Links:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.