Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default value in Enterprise manager is not visible in Access front end

Status
Not open for further replies.

Xenon54

Programmer
Sep 2, 2002
9
BE
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:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
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.

Andy
 
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

Andy
 
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:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top