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

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How To Search Various Tables For Date Datatype Fields, Office 2007    
 
   
Sako
post Sep 16 2011, 09:49 AM
Post #1

UtterAccess Guru
Posts: 577
From: Canada



There is an old 3rd party software we have that we use to track calls.

in one of the forms, there are some dropdown lists, checkboxes and date fields. I used Access to retrieve the table containing the info inthose calls and I could find the drop down lists and the checkboxes of that form. For some reason, I couldn't find any date fields at all on the tables I linked to that database. (after searching the most relevant tables (they were not named intuitively at all).

I was wondering if there is a way to search all date fields from various tables. If yes, I'll link all the tables I can, do that search and see which date field corresponds to the ones I need.

Thanks
Go to the top of the page
 
+
Jeff B.
post Sep 16 2011, 09:56 AM
Post #2

UtterAccess VIP
Posts: 8,170
From: Pacific NorthWet



If this is a one-time task, and if you don't have (literally) hundreds of tables, you could use the built-in documenter to generate a detail view of each table definition. You could find "Date/Time" fields there.
Go to the top of the page
 
+
Jerry Whittle
post Sep 16 2011, 09:56 AM
Post #3

Utter Access VIP
Posts: 1,007



Depending on the version of Access, open the database files with linked tables. Go to Tools, Analyze, Documenter. You can search the tables there and see all the data types of the fields.

But don't be surprised to find there aren't any date fields. They might have put the data into text fields and used things like CDate to convert the text to dates. It's a bad way to design a database, but I've seen it too often.
Go to the top of the page
 
+
theDBguy
post Sep 16 2011, 09:57 AM
Post #4

Access Wiki and Forums Moderator
Posts: 48,113
From: SoCal, USA



Hi,

If you cannot find it manually, perhaps the 3rd party software may not be storing the dates as a Date/Time data type.

Just my 2 cents...


EDIT: Guess I'm starting out a little slow this morning... Need more (IMG:style_emoticons/default/coffee1.gif)

This post has been edited by theDBguy: Sep 16 2011, 09:59 AM
Go to the top of the page
 
+
Sako
post Sep 16 2011, 10:16 AM
Post #5

UtterAccess Guru
Posts: 577
From: Canada



I thought about the date fields / text field issue too,

but in the same table where I can find the checkboxes and the other data, none had anything that even looked like dates...

There are a lot of tables, so if they really are text fields, it;s going to be really hard...

Edit: Yes, you are right, their dates are stored as text...!!

This post has been edited by Sako: Sep 16 2011, 10:17 AM
Go to the top of the page
 
+
Jeff B.
post Sep 16 2011, 10:23 AM
Post #6

UtterAccess VIP
Posts: 8,170
From: Pacific NorthWet



Nice catch!

You can use a query to convert (some) text-type pseudo-dates into real Date/Time values.
Go to the top of the page
 
+
Sako
post Sep 16 2011, 10:26 AM
Post #7

UtterAccess Guru
Posts: 577
From: Canada



Well, it's not really a catch since I still haven't found in which table the data is stored in.

All I know is that all dates in that database are of text datatype!
Go to the top of the page
 
+
Jerry Whittle
post Sep 16 2011, 12:50 PM
Post #8

Utter Access VIP
Posts: 1,007



Here's how to find out where your linked tables go:

SELECT MSysObjects.ForeignName, MSysObjects.Database, MSysObjects.Type
FROM MSysObjects
WHERE (((MSysObjects.Type)=6));

However that doesn't tell you which table inside the file has your data. For that bring up Linked Table Manager and run it. The string should show the database name followed by the table inside of it. Something like this for the Programs table inside the COINS database.:

Programs (C:\Users\COINS.mdb\Programs)

You can bring up Linked Table Manager by going to Tools, Database Utilities OR right clicking on a linked table in the database window or navigation pane.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 07:35 PM