UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Finding Default Value Without Opening Every Table, Access 2016    
 
   
damian.green
post Jan 16 2020, 12:32 PM
Post#1



Posts: 63
Joined: 24-October 18



Is there a way to find all tables and fields that have a default value set without having to open each table up individually?

I've got over 150 linked tables (going back to a SharePoint site). In my fast programming style, I know I allowed some of the number fields to keep the default zero value.

I want to know which tables have the value, so I can painfully open the SharePoint list, change the settings, then refresh the linked list.

Also is there a way to change the default for a number field from 0 to blank?
Go to the top of the page
 
GroverParkGeorge
post Jan 16 2020, 12:46 PM
Post#2


UA Admin
Posts: 36,515
Joined: 20-June 02
From: Newcastle, WA


I don't have code handy. But tables and fields in tables do have properties. One of those would be the DefaultValue of a field. So, you can use DAO to inspect your tables and locate those DefaultValues in an Access table.

Because these are SharePoint lists, there may be some problems in doing that, but in general it should be possible. I do have something "somewhere" in an old library that inspects fields and datatypes that could serve as a template. I'll look, but someone should be along with some VBA in the meantime.

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
theDBguy
post Jan 16 2020, 12:53 PM
Post#3


UA Moderator
Posts: 77,304
Joined: 19-June 07
From: SunnySandyEggo


I am thinking after you have fixed the table at the source, there shouldn't be any need to "refresh" the links. I wonder...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
theDBguy
post Jan 16 2020, 12:56 PM
Post#4


UA Moderator
Posts: 77,304
Joined: 19-June 07
From: SunnySandyEggo


Also, since you're talking about SharePoint, you might be able to use jQuery to set the Default Values en masse.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
Jeff B.
post Jan 16 2020, 01:19 PM
Post#5


UtterAccess VIP
Posts: 10,350
Joined: 30-April 10
From: Pacific NorthWet


By "blank", do you mean "null"?

--------------------
Regards

Jeff Boyce
Microsoft Access MVP (2002-2015)

Mention of hardware or software is, in no way, an endorsement thereof. The FTC of the USA made this disclaimer necessary/possible.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    20th January 2020 - 09:05 PM