Query To Get All My Table Names

Mar 13, 2007

Hi is there a query in access to return all of my table names.

to do what 'show tables' does in mysql

View Replies


ADVERTISEMENT

Make Table Query And Expression Names

Aug 31, 2007

Hi all,

I have a Make-Table Query that has five expressions. I have changed the properties of these columns so that, when you view the query, it shows the column names I have chosen. So, instead of Expr1, I get "Haggis", and instead of Expr2, I get "Cold Toast".

BUT, when this query creates a table, the column headings revert to Expr1 and Expr2. Is there any way to make my custom column headings stick in the new table?

I should add that I frequenty run this query and overwrite the table. Thus, even if I go into the table and change the field headings, as soon as it is overwritten these changes revert.

View 2 Replies View Related

Queries :: Query With 2 Names Related To Same Table

Aug 18, 2014

I have a table (tblrecords) with fields, entered by, recieved by and date and time,entered by and recieved by are both referenced in tblemployee.i want a query that will retrieve

fname, lname (of entered by from tblemployee), fname, lname (of recieved by from tbl employee) and the date and time from tblrecords)however i cant think how to do it with both names coming frm the same table?

View 9 Replies View Related

How To Pass Table Fields Names From VBA To Query

Aug 15, 2014

I've been developing an Access database to keep track of my company's ongoing projects. There's also a form to browse the history of users actions within the program. It's based on table tbHistory that stores actions and parameters as numbers (for example eventId = 1 is "logged in" and eventId = 2 is "logged out"). I've been using a query to translate those numbers to text with a syntax like:

Code:
IIf([tbEvents].[EventId]=1 Or [tbEvents].[EventId]=2;[tbEvents].[EventDesc];IIf([tbEvents].[EventId]=5 Or [tbEvents].[EventId]=6;...

It worked fine but eventually the expression within expression builder has grown to the level that exceeded allowed limit and I couldn't develop my statement any more.. I decided to develop a vba function that would take eventId as a parameter and would retrieve a string, here it is:

Code:
Public Function translateHistory(eventId As Long) As String
Select Case eventId
Case 1 To 2
translateHistory = ""[tbEvents].[EventDesc]""
Case 6
translateHistory = "[tbEvents].[EventDesc] & "" <b>"" & [tbFormDesc].[FormName] & ""</b>"""

[Code] ....

And in my query I replaced that extremely long expression with just translateHistory([tbHistory].[eventId]). It seems to work, but the result it brings is a pure string with table names and fields - in other words, the query doesn't recognize it should be replaced with appropriate value. Here's the output I get:

Of course I'd like "[tbEvents].[EventDesc]" to be replaced with appropriate value of field "EventDesc" from table "tbEvents" as it used to be.

View 13 Replies View Related

How To List All The Column Names For A Given Table Using A Single Query?

Dec 16, 2005

:mad: :mad:
Hi folks,

I wonder how can I list all the column names for a given table using a single query? I know how to do it in SQL using system tables, but no idea how to do that in Access.

Thanks.

View 1 Replies View Related

Queries :: Pass Table Names To Delete Query

Aug 27, 2014

I use the following code to delete from a table all records except those meeting the WHERE criteria:

Code:
DELETE tblABC.*, tblABC.SubjectID
FROM tblABC
WHERE (((tblABC.SubjectID)<>99 And (tblABC.SubjectID)<>432));

I'd like to run this exact same query, but on many other tables, all of which are stored in tblTablesToClean (TableID, TableName).

Any good way to have Access loop through the list of tables in tblTablesToClean, each time passing the name of the table into the DELETE code and running the code, until all tables have been processed?

View 5 Replies View Related

Query: Access Macros, Autodeleting Rows And Updating Table Names

Oct 11, 2007

I'm a bit in over my head. Unfamiliar with Access macros, I need to write a bunch of them for work, and soon. Unixen I can deal with, largely undocumented convoluted Access macros are something else....

My current problem is: I have a table. The first column has a value in it for almost every row. However, there are six other columns after it. I need to write a macro to automatically delete all of the rows that don't have data in the last six columns. Microsoft Help is, as always, of zero use. The FindRecord feature allows me to use expressions to search, but of course, the help fails to tell me what syntax Access uses.

Oh, and it asks me to select a table from the drop-down list. Can I use wildcards here? Is there a way to get it to automatically open the newest table, or will we have to change the macro accordingly each month?

Most tutorials/guides I'm Googling rather brilliantly repeat the same things the help does, AKA, are useless. (Why do they bother writing them if you're not giving new information...?)

I'd ask about the other various access questions I have, but I can pick them up as I go, this is the most pressing question.

View 2 Replies View Related

Populate A List Box With Table Names & Table Data

Feb 27, 2008

I have 2 questions/problems:

1. I want to populate a list box with all the Tables Names in my Database using VBA.

2. I also want to create another List Box or Grid (or any thing that will show table data) that when i have select a Table Name (See above (1)) it will show all the data in that table in the List Box. Was thinking some kind of SQL using vba to populate the list box?

Any ideas or help will be much appreciated

Richard

View 1 Replies View Related

Tables :: Possible To Have The Field Names In Table Be Set By Values In Another Table?

Jul 27, 2014

Is it possible to have the field names in a table be set by the values in another table? The desire being that for a database used in various locations, the local variations could be changed in one table which would then propagate that change throughout all the forms, reports, tables etc.

View 14 Replies View Related

Field Names Don't Match Names On Form

Nov 7, 2006

I have a form with several data fields on it. I also have a button on the form that allows the user to duplicate a record . The reason for this duplication is so that if there will be an additional client record for the same customer, but only one piece of data will need to be changed, it's easier to copy the record and then change the one field.

However, I am getting the following message:

"some of the field names you tried to paste don't match fieldnames on the form"

and then not all data in all fields gets duplicated.

I need to figure this out, but am going nuts with it. If anyone has an idea or two they'd care to toss my way, I would be happy.

Thanks one more time, in advance!!

View 1 Replies View Related

Reports :: Repeating Row Names And Column Names

Jan 17, 2014

How can I repeat column names and row names on multiple pages of the report ?

View 1 Replies View Related

Temporary Table Names

Aug 1, 2006

Hi there

I'm new to this so please be patient!

I have developed an Access database which produces financial reports based on a date range which the user specifys, taking the data from a SQL server. He chooses his dates and then runs a macro which creates the new tables, overwriting previous tables. Numerous financial reports run on these tables so I need to keep the table names the same.

The problem is that only one user can access the DB at anytime because the new user can't delete the other users table becuase it may be based on a different date range.

I'm open to suggestions but maybe what I need to so is create tables which are based on the user id when he logs in to the Access database so that he doesn't delete someone elses table. How can I do this please!!!???

Thanks in advance

Davebhoy

View 4 Replies View Related

Renaming Table Names

Jan 4, 2008

Hellow,

Little question, hopefully not a big answer :)

i have four oracle db'ses mydb_db_test, mydb_db_production, mydb_db_develop

within access i have linked tables from the first one; let's say: mydb_db_test.tblOne, mydb_db_test.tblTwo

What i want to do is:
1) import the same tables from the other trhee db'ses
2) rename the table names by vba code
example: my_db_db_test.tblOne has to become tblOne
and when i switch from db (to for example the production), the tblOne has to be renamed originally (mydb_db_test.tblOne) and the other has to be renamed (so mydb_db_production.tblOne becomes tblOne).

Now the question which you probably ask me:
Why not by a connection string change...

Well, that's the problem, the linked tables are being set to readonly, and the property cannot be changed (at least, as far as i tried); so that's why i thought of this workaround. By linking all three databases, i also always have for those table the three connection strings, and by renaming them (i now do this manually) i always can pick the right connection.

Thanks in advance for the advise!

View 3 Replies View Related

Getting Column Names Of A Table

Jul 7, 2005

Hi All,

How to get the column names of a table through a query ? Is it possible in Ms-Access ?

Thanks

View 1 Replies View Related

Get Column Names From Table

Feb 21, 2007

Hi!
Can I do a select query in order to get all the column names from a certain table in access?

View 3 Replies View Related

Changing All Table Names

Feb 9, 2006

Hi, I have an Access database that I would like to do a mass Table Name change. Reason is, all tables start with Data.<table name> so one table is called Data.Names and I would like it to be called just Names. I can manually do this but there are over 600 tables. Would take some time.

Please let me know if there is a script or how I can approach this. Maybe I could loop through each table name where it finds "Data." and strip that part out.

Thanks

Sherriff

View 1 Replies View Related

Retrieve The Table Names

Jun 28, 2006

Hi:

In the database, I want to create a combox in the form, it the dropdown list show all the table names I created, or linked.

I don't want to create a table to store the table names.

Can we retrieve the table names from the Tables sections directly?

Thanks.

View 1 Replies View Related

How To Get The Names Of Table In A .mdb File?

Mar 16, 2007

Hello All,

I ma using a .mdb file in a program and want to get the list of all tables and all the columns of the respective tables in the .mdb file.
In Oracle we use 'select * from table' for getting all the tables in the DB. But how it is done in MS-Access?

Pls help.

Regards,

View 2 Replies View Related

Displaying Table Names In Dropdown

Jan 22, 2008

Hi,

In our database, we have a table called change_log which is to be filled in whenever someone adds/removes columns from a table in the database or modifies column properties.

One of the columns in the change_log table contains the name of the table which was changed. To avoid typos and misspellings, I would like to create a dropdown which displays all table names in the database. Can this be done programmatically?

Thanks.

View 2 Replies View Related

Access Field And Table Names

Jun 30, 2005

hello,

Recently I have started working for one of the company where I have to deal with one of the access file. this file has lots of tables containing many fields.

My question is

How can I get all the tables name, their fields and attributes in Microsoft Word file. I have tried opening table > design view and copy text but it doesn't work. also tries coping table and paste in in word file but it takes ages

any suggestion will be helpful

Thank you
Viral

View 2 Replies View Related

Check Boxes To Appear With Table Names

Mar 13, 2008

What I want is check boxes to appear on a form with the name of the tables.

i.e. I Currently have 3 tables (there are more tables in my database but for this example I will only use 3) - MPI_CORE, MPI_IDS and REFF_DR.

I want some code to put the table names as a check box i.e.

[] MPI_CORE
[] MPI_IDS
[] REFF_DR

*please note [] = a check box

How could I do this using VBA?

Thanks in advance for your help

View 4 Replies View Related

Queries :: Finding Names That Appear More Than Once In A Table?

Jul 29, 2013

I have a table with associate names and rankings for each month. I need some way to find out which associates appear in 2 consecutive months with a certain rating. I have a query that will allow you to key in which month you want to look at, but I can't figure out how to write the query to return results only for those associates that appear twice in the months chosen. For example:

John Doe was rated 1.5 in May and 3 in June.
Jane Doe was rated a 1.5 in May and 1.5 in June.

I want a query that will allow me to put in May and June as the criteria as well as < 2 for the rating and only return those that show in both months...

View 5 Replies View Related

Queries :: Column Names Not In Table

May 15, 2015

I have 2 or 3 Queries which are run specifically export data to an Excel file required by external agencies.The queries contain column headings, required by the agencies, which are not derived from Table fields. Obviosly, no record data is produced for these columns.When the queries are run, the dreaded 'Enter Parameter Value' message appears for each to the additional column headings.

The following is a copy of the SQL Code for one such Query;

SELECT DISTINCTROW [Name1] AS Title, [Mail List].[First Name], [Mail List].Surname, [Mail List].[Address 1], [Mail List].PostCode, [Name2] AS [Aggregated Donations], [Name3] AS [Sponsored Event], [Mail List].SubDate, Sum([Mail List].[ Recd]) AS [SumOf Recd]
FROM [Mail List]
GROUP BY [Name1], [Mail List].[First Name], [Mail List].Surname, [Mail List].[Address 1], [Mail List].PostCode, [Name2], [Name3], [Mail List].SubDate, [Mail List].[Gift Aid]
HAVING ((([Mail List].SubDate)>#4/4/2014# And ([Mail List].SubDate)<#4/6/2015#) AND (([Mail List].[Gift Aid])=True));

Is there not some way in which these columns can be defined in Property Sheet such that this error message is prevented?

View 12 Replies View Related

Copying Column Names From One Table To Another

Jul 28, 2014

I am using Access 2007 and would like to know how to copy column names from one table to another. I am importing data from excel and the column names come out as 'Field 1', 'Field 2', etc. I went through the trouble of manually renaming the column names of one of the tables (22 columns in all). I will be importing/creating 55 new access tables and don't want to have to manually rename all of these columns. All of the columns in all of the tables will be exactly the same, so I was hoping that after I did this once, I could copy the column names to the other 54 tables.

View 1 Replies View Related

Access Table, Fileds And Attributes's Names

Jun 30, 2005

hello,

Recently I have started working for one of the company where I have to deal with one of the access file. this file has lots of tables containing many fields.

My question is

How can I get all the tables name, their fields and attributes in Microsoft Word file. I have tried opening table > design view and copy text but it doesn't work. also tries coping table and paste in in word file but it takes ages

any suggestion will be helpful

Thank you
Viral

View 1 Replies View Related

Print A List Of Table Field Names

Dec 20, 2005

Just a quickie- i hope. :rolleyes:

I am in the process of trying to merge two large databases. I have four tables that really should be one to work in the new DB. I just need to be able to print a list of fields in each table so that I can work on the new combined structure before making the changes. I know I can use the documenter but this produces a very comprehensive list which is much more than I need.
Is there anyway of producing a similar list without the detail, just showing the field names.

Thanks

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved