Tables :: Creating Table Within Existing Database Using SQL Commands

Apr 8, 2015

I was asked to create a table within an existing database using these SQL commands;

CREATE TABLE Vehicle (reg_no TEXT(10)
CONSTRAINT VehicleKey PRIMARY KEY,
type TEXT(10),
purchase_date DATETIME,
last_service_date DATETIME, mileage_at_last_service INTEGER);

I was told to save the query and check the new table had the required records in it.

I had huge problems when I tried to save the query and kept getting error messages like: "query must have at least one destination field" and "syntax error in field destination". This was strange since I was sure I typed the query exactly as it had been written on the worksheet.

Having not changed the SQL command at all it eventually worked when I skipped the 'save query" stage and just went to the "run query" stage. I still don't know why it actually worked in the end and why I kept getting error messages.By running the query am I supposed to just click on "RUN" or can I check the information first by looking at datasheet view?

View Replies


ADVERTISEMENT

Tables :: Creating Er Diagram From Existing Database?

Aug 21, 2013

Using access 2010; anyway to create an er diagram from an existing database? I have inherited a fairly large database and need to make changes to some field properties and need to find out where these fields are located. I know I can go into tools and run the documenter but doesn't give me an easy format to look at.

View 5 Replies View Related

Tables :: Add Existing Field To Local Table Within Same Database

Oct 31, 2013

Adding a field in Access 2007.

I am adding a exisiting field which is already available on a Global Table and would like to add it on a local table within the same database. Also bearing in mind the db contains main objects - Tables/Queries/Sharepoint lists/forms/reports

Whats the process in doing this? Once added how does the data get populated?

View 1 Replies View Related

Selecting From Table In Form Creating New Entries As Opposed To Using Existing

Sep 18, 2012

I have setup a simple access database consisting of 3 tables

Volunteer
Id (PK)
Name

Job
Id (PK)
JobName

Link
Id (PK)
VolunteerId (FK)
JobId (FK)

There is a one to many relationship between Volunteer and Link and a many to one between Link and Job

I want to create a form from which I'll select a Volunteer Name and then choose a JobName from a list box of options and have it create an entry in link with the id of the volunteer selected and the id of the job selected

So let's say there are 5 entries currently in the Job Table.. let's call the JobNames A,B,C,D and E.

In my form I select my name from the list (sourced from volunteer.Name) and then select B from the dropdown. My desired result would be a single entry gets created in Link with VolunteerId = 1 (representing me) and JobId = 2 representing the selection of B. Problem that I am having is that after I select B in the dropdown it creates a new record for B in Job and the Link table gets updated with that JobId as opposed to simply using the one that was already in the table.

View 1 Replies View Related

Forms :: Creating Command Button On Form Containing Drop Down List Of Commands?

Nov 30, 2013

I wish to create a forms that has command button which display a drop down list. The drop down list should contain commands for reports and forms.

Lets assume we have forms named FrmStock, FrmSales and we also have Reports named RptUserLog , RptTurnover.

View 3 Replies View Related

Tables :: Normalize Existing Table Containing Data And Copying PK Value To FK In New Table

Nov 21, 2014

I am working from an existing database which is just two table. The main table has a massive amount of redundancy and duplication and needs splitting into, at first glance, 5 tables.

After I have run my various make table queries and added a Primary Key and FK field to the new tables how do I populate the FK with the Parent PK.

I thought I could simply add all the fields from the new table and then create an adhoc join in an update query to populate the PK to the FK. When I do this however I get "You are about to update 0 records"

I have tried the table analyzer but it doesn't give the correct options to split the table the way I need.

View 6 Replies View Related

Tables :: Add Existing Field From One Table To Another

Apr 8, 2013

I am trying to add an existing field from one table into another table but the table Im currently in shows that option to be greyed out. What would cause that option to be greyed out?

View 2 Replies View Related

Tables :: Autonumber Order In Existing Table

Jul 9, 2015

I was adding an autonumber field to an existing table and I assumed the numbering would follow the order of the primary key but that doesn't seem to be the case.

View 9 Replies View Related

Tables :: Adding Records To Existing Table

May 19, 2014

What I have is a database that I have done some tweaking on and in the meantime the original db has been in use which has added around 200 or so more records in the table.

What I would like to do is to just update the db that I have been working on with the older db table(the one who has the additional 200 records).

EX. DB A(Old DB, Newer Table) DB B(New DB, Older Table)

I want to put DB A table into DB B

Is this a simple fix? Or do I need to write some sort of query to update the records in the old table? I've tried to export the excel file and then import but it puts it in unrelated objects and then my switchboard or nothing works.

View 9 Replies View Related

Tables :: Adding Many To Many Relationships To Existing Table

Sep 13, 2012

I have 3 tables

tblProductInfo
- ProductID
- ProductItemNumber
- JDEDescription

tblFacility
- FacilityID
- FacilityDescription

tblProductFacilityMM
- ProductToFacilityID
- ProductIDFK (combined with FacilityIDFK to make a PK)
- FacilityIDFK

As I'm writing this out, I am realizing that tlbProductFacilityMM.producttoFacilityID is probably not necessary, but that I don't expect that to have much significance to the issue. So I've setup a query between the two tables:

Code:
SELECT tblProductInfo.ProductID, tblProductInfo.ItemNumber, tblProductInfo.JDEDescription, tblProductFacilityMM.FacilityIDFK, tblFacility.FacilityDescription
FROM tblFacility INNER JOIN (tblProductInfo INNER JOIN tblProductFacilityMM ON tblProductInfo.ProductID = tblProductFacilityMM.ProductIDFK) ON tblFacility.FacilityID = tblProductFacilityMM.FacilityIDFK;

And used it to create my subform which is simply a drop down box for tblProductFacilityMM.FacilityIDFK. My main form is one that has already been in use for 6 months or so, it is based off the tblproductinfo table and needs to have the option to select multiple Facilities for each ProductID. I inserted the subform, but when I try to select a facility I get an error that reads:

Quote: Cannot Join Records; Join key of tblProductFacilityMM not in recordset.

View 2 Replies View Related

Modules & VBA :: Split Database - Moving Table To Existing Backend

Apr 8, 2015

I have a client that is using a split database. I am working on an update to the program and need to transfer a table to the backend that has the correct structure and information included in it. My thoughts are to make a one time use program that transfers the table to the backend. I have seen DoCmd.TransferDatabase and DoCmd.CopyObject as possible ways to go.

View 10 Replies View Related

Tables :: Import From Excel And Append To Existing Table

Apr 7, 2015

I am trying to import from Excel and append to an existing table. My excel sheet is named tblStatus and I am trying to append it to my Access table "tblStatus".

I get an error message that says "The first row contains some data that can't be used for valid Access Field Names. In these cases, the wizard will automatically assign valid field names." (I used the excel sheet to set up my table.) After I click OK, I get to the point where I can click finish, and I get a "Subscript out of range" error.

MY row headers are:
strOrderOps
strOrderNo
strOperation
strOrderType
dtmBasicStartDate
dtmActualFinishDate
dtmCalFinishDate
strStatus

I am not sure what is going on.

View 4 Replies View Related

Tables :: Import To Existing Table (Type Conversion Failure)

Dec 12, 2012

I need to import an excel spreadsheet into an existing Access 2003 table. Due to regulations, the spreadsheet cannot be linked.

When I try to import the spreadsheet, I receive a 'Type Conversion Failure' associated with a 'Product ID' field. In the Excel file, this column is populated with two types of values-- either a 9 digit number, or a 9 digit alpha numeric value. The 9 digit numbers import correctly, but the alpha numeric values fail.

Field names/layout in the excel spreadsheet are identical to the Access table, and the field type in the existing Access table is set to 'text.' There is no set Format, or Input Mask.

What I could change with the existing table to make this import work? I'd like to avoid importing a new table, as this would force me to recreate a number of relationships after each import.

View 1 Replies View Related

Tables :: Creating Database Of Data Groups

Jul 19, 2013

My challenge is to take about 200 boxes, all of which are stuffed with file folders, and to create a database of their contents. That's all well and good. I made a simple table that listed the record, the date, etc, but I ran into trouble fairly quickly when I came across a folder that had folders inside of it. Basically I need a way to represent the folder structure the way it is in the box that makes sense within Access. What I'm imagining is something like this:

Record 1
Record 2
Record Group:
- Record 1
- Record 2
Record 3
Record 4

More recently though, I'm wondering if don't need to make a whole new table for that set of data. I just don't know how to set up the relationship

View 8 Replies View Related

VBA Commands To Import DBF Files Into New Table

Feb 26, 2015

I've been creating an automated way for users to import an existing DBF III file into an Access Table and then I'll be doing some other things after it's in. The user needs to be able to click a command button to open up a file picker, select the desired DBF and then click import and have it be imported into a new table.

Originally I had this all working because there was only one possible file name for the DBF file in each folder so instead of using a file picker I used a folder picker and supplied the file name in the VBA code as it was static.

However, I now need the user to be able to select a specific file and the name could be anything.

I've successfully edited the file picker to allow them to select a file however the importing is an issue. In order to do a TransferDatabase command I need the file path alone for DatabaseName and the file name alone for Source.

What would be the best way to split those two pieces of data up once the user has selected the file they need?

View 1 Replies View Related

Access Commands Vs SQL Commands

Sep 23, 2004

Does anyone have a source that lists basic Access (2000) commands. I have training in SQL server (so I am just starting out) but I am working with Access and the commands aren't always the same and the help files in Access aren't much help.

My immediate need is to find the equivelant of the go command. I am trying to build one query with multiple update statements.

View 2 Replies View Related

Creating A New Record From Existing Information

Mar 28, 2006

Hi there,

I have a form with information on it relating to several linked tables. I would like this information to be duplicated in the tables and a new autonumber assigned.

Is there a way that I can do this by clicking one button and the autonumber will automatically generate a new number keeping the rest of the information in the form and updating the tables with a new record?.

Thanks for you help
Belinda

View 2 Replies View Related

Creating Fields From Existing Data

Aug 10, 2006

I am not sure that I am in the Correct Section for this question but I am sure I can be forgiven for that :

I am attempting to build a db for a friend who has all his data in one table. During normalisation I have seperated the various threads of data into various tables of usable information. My problem is that I need to seperate his clients fullname into First & Surname i.e. Fullname: Mick Burke to FirstName: Mick and Surname: Burke - in other words make two fields from one.

Any help in doing this would be well appreciated.

View 2 Replies View Related

Creating One Table From Many Tables

Aug 24, 2007

Hi All.
Need union three TableA, TableB and TableC into one table called TableX? All table has same column name. TableX shouldn't has dublications.
Thanks

View 1 Replies View Related

Tables :: Creating A Secondary Table

Oct 27, 2014

I have an Access database, where one of the tables is near the maximum amount of fields (241 of 255), was just wondering if I could set up a secondary table that would be linked to the original table by a specific field and would store the other fields that would like to add to the table.

View 7 Replies View Related

Tables :: Creating Link To Oracle Table?

Jul 25, 2014

We have an MS Access 2010 Database that uses Local Tables, External MS Access Tables, and ODBC Linked Oracle Tables (Accessed for Read Only). The unsual issue occurs with the ODBC Linked Oracle Tables.

One of the more important aspects of the project is to modify the ODBC Links to point to upgraded Oracle Database Tables. Up until today, all of the Links had been able to be remediated with a simple refresh and test.

This morning, however, it was determined that one of the Database Tables did not exist in the Schema. Instead, it was an Oracle Synonym for a Table that existed in a different Schema. We believe that we have the proper authorization for access to all of the Schemas involved, and despite this fact, MS Access was unable to link to the Table properly.

View 1 Replies View Related

Tables :: Difference Between Creating A Table Using SQL And MAOL

May 26, 2014

what is the difference between creating a table using SQL and creating a table using MAOL (access object library)? I ran into these 2 methods when taking a tutorial on the internet? What are the advantages of each method?

View 1 Replies View Related

Creating A Form To Append A Table With Values From Other Tables

Oct 12, 2006

Hi,

I have built an Access DB containing 3 tables: dimensions, time, companies. The tables are not linked and are to be used to look up values for the new form. The goal is to create an Access form that would allow the user to select distinct values from all 3 tables, enter some own data and then execute an append query to add the record to the main table.

Something like this:

Initially I have 3 tables:

Prepopulated Dimensions table with fields:
dimension
....

Prepopulated Time table with fields:
Date
Day
Month
Year

Prepopulated Companies table with fields:
Company
....


My form is to be able to select distinct values (combobox) from all three fields:
Company
Dimension
Day
Month
Year
Value (data entered by user)

The record then is appended to the Main table containing:
Company
Dimension
Day
Month
Year
Value (data entered by user)

Thanks a lot for your time and help!
Polar

View 3 Replies View Related

Tables :: Creating A Table With Yes / No Data Type Results

Jun 18, 2014

I am creating a table that is a master list of all of my company's product. Each "customer" that we have will always be ordering the same items, but not all of the items that we have available. I need a way to go through the master list and click a yes or no and have that item added to the "customer's list of items on a new table.

I need to create a sublist for each "customer" like individual shopping cats for each customer. These individual lists need to link back to the master list in case of product changes, description changes, and cost changes.

I would like to create a form where the end user can type in a product number, description, or manufacturer number and have that item added to the "customer's" list.

View 3 Replies View Related

Tables :: Creating A New Main Table - Quotation Tracker

Nov 7, 2012

My Main Table in my Database is "Quotation", what do i need to do in order to create a new Main Table called "Quotation Tracker" and "Quotation" would now be under "Quotation Tracker"

View 8 Replies View Related

Tables :: Creating Relationship Table From Clients To Orders

Feb 4, 2014

I have a Client database table in Access. I now need to add a simple order table (related) to the client table. I have a client ID field set to autonumber in the client table. As I start to create the orders table I'm not sure how to link the two so that I'm not entering data twice and have assurance that they are tied together.

View 4 Replies View Related







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