Defining Relationships In Access

Apr 25, 2006

Hi,

I seem to be stuck on the simplest of tasks with both google and forum searches coming up with information that’s either too simple or too complex for my needs (not time wasted though because I’m learning all kinds of related stuff).

How do I join my tables with one-to-one relationships?

[edit] Doh, got this one now - by indexing without duplicates then saying all in one have to link to one in another:D

How do I define both fields in a linking table as composite or two field primary key?

View Replies


ADVERTISEMENT

Defining Primary Key From Two Fields

Mar 23, 2008

I have this table:

intSalesID (Number, Indexed: (Yes No Duplicates)
intCarID (Number, Indexed: (Yes No Duplicates)
intQuantitySales (Number, Indexed: (No)

This table is a cross table from the two tables tblCars and tblSales where the intSalesID and intCarID are Primary Keys. In this table I didn't set the P.K. I saw databases that have P.K. in tables like this deined from the two fields (intSalesID and intCarID, would be in my case). I wanted to ask what is the difference if I leave this table like this and if I set this two fields to form a P.K.? What is the difference in these twi cases? What do I get and what I don't, if I do either way? Thnx.

View 3 Replies View Related

Defining Criteria In Form

Aug 4, 2005

Hi all - I have a suite of reports which provide customer details. They all require the user to input the name of the customer.

The way it works is that I have a query which returns everything for the customer.

Then I have other queries based on the first query which bring back the specific information I want regarding the customer.

This works fine when the customer's name is entered using [Enter Customer Name] in the criteria of the relavant field in the first query.

However, because a user might want to run several different reports on the same customer it becomes a chore for them ot repeatedly have to enter the customer name.

My solution is to have an unbound field in the reports menu for the customer name and to use this as the criteria in the query, so it now reads [Forms]![FrmMenu]![Text42].

The first query runs fine, but the queries based on it are suddenly not returning any records.

There is undoubtedly a simple explanation for this but as I'm quite dim, I can't see it. Could somebody enlighten me and maybe even suggest a solution?

View 4 Replies View Related

Defining A Checkbox As A Variable

Jun 6, 2006

Hello all,

I was wondering what should I define a chechbox as if I want to make it a variable, so that when it is checked (= -1), I can check for the -1 and loop somewhere.

Thanks

View 1 Replies View Related

Defining A Checkbox As A Variable

Jun 6, 2006

Hello all,

I was wondering what should I define a chechbox as if I want to make it a variable, so that when it is checked (= -1), I can check for the -1 and loop somewhere.

Thanks

View 1 Replies View Related

Defining A Checkbox As A Variable

Jun 6, 2006

Hello all,

I was wondering what should I define a chechbox as if I want to make it a variable, so that when it is checked (= -1), I can check for the -1 and loop somewhere.

Thanks

View 5 Replies View Related

Importing Excel To Access Keeping Relationships In Access Tables

Sep 13, 2007

I have a stock control database which i have nearly completed. This has Manufacturer, which is linked to products, which is linked to Sub Product(which also has field partCode). i.e. Manufacturer1 can have 3 products, and each of these products could have 5 subsystems and partcodes. Each partcode is unique to that subsystem/product/manufacturer.

I then have a pricing spreadsheet in excel, which has many tabs. A new column has been added for each item for Manufacturer,Product,Subsystem and Partcode.

I need to import these manufacturers,products,subsystems and partcodes, but into the tables with the correct relationships, i.e. product1 and product2 are products of manufacturer1 and so cannot come under manufacturer2, and so on.

I hope this makes sense, Thanks in advance for any help you can give!

Emily

View 14 Replies View Related

TransferSpreadsheet - Defining Range Syntax?

Mar 7, 2005

Hi,

I am trying to auto-import data w/ a single-click from several Excel sheets. A sample line:

DoCmd.TransferSpreadsheet acImport, , "tblTS1", filename, True, Product!A1:H100

where
tblTS1 - tbl where I'm putting the data
filename - c: est.xls
Product!A1:H100 - range of data I want in sheet Product

I am having problems w/ the "range" portion of Transferspreadsheet (I know it's this portion, because it works when I pre-name the range in Excel). I have tried all sorts of variations on the syntax:

Product!A1:H100
"Product!A1:H100" or 'Product!A1:H100'
"Product" & ! & "A1" & : "H100"
"'Product'" & ! & "A1" & : "H100"
Product & "!" & A1 & ":" H100

I get the error msg:
The MS Jet database engine could not find the object '$:'. Make sure the object exists and that you spell its name and the path name correctly." or "Syntax error"

I wanted to mistake-proof the data transfer, so I did not want to:
- predefine the range in Excel (under InsertNameDefine)
- have the user enter values in text boxes

Any help w/ the syntax would be greatly appreciated!

Cheers,
dvs :confused:

View 1 Replies View Related

Defining Query Filters From A Form

Nov 28, 2005

I have a database about when computers have been installed

I have a form
It has a drop down list with Januray through to December

I want the user to select a month and a year and then click the command button and it will run a query displaying all the computers installed in the month of that year

any ideas people?

View 4 Replies View Related

Make Query - Defining Fields

Mar 30, 2007

When I run this query, the fields in the new table contains 253 characters. How do I specify in the SQL command that the field Carg2 and Carg3 will contain 3 charachters ?

SELECT dbo_allesc.AccReport, Left([AccReport],2) AS Carg2, Left([AccReport],3) AS Carg3,.........................
INTO regTabell

Thank you, Tor

View 2 Replies View Related

Modules & VBA :: Defining New Date Format

Mar 17, 2015

how shall i define my new Date or numbers.Now "yyyyXX" this is my date "y" is year 4 digits and "XX" is my problem 2 digits. I ll give an example,

(XX = 01....36) XX can be max 36 and min 01 of course. f. Exp. 201436 and next number shall be 201501.

the biggest problem is different of these number with basic math 201501-201436= 65 but for me it should be 01... The Question is; How can define these ??

View 8 Replies View Related

Defining Sampling Periods Using A Calculated Field

Jun 6, 2006

We have a db of salmon survey data where catch data is recorded by date, site, etc.
Historically, we have used ‘sampling periods’ to group our results into blocks of time that can be compared from year to year, and within year.

Now, having frequented this forum I’ve read that we shouldn’t store information in tables that can be calculated from fields and I want to try to follow that advice in this instance but am having trouble working this out.

Here’s how we define a sampling period.

1.The start date of the first sampling period in a sampling year is the last Monday in the most recent November.
2.Each sampling period is 14 days long.

What I want to do is have a query use the date of a set to calculate what sampling period the set belongs to. I have an idea that I could use a datediff function to calculate this if I can figure out the ‘last Monday in the previous November’ part. I’ve searched this forum and googled but am having trouble finding anything that I can adapt to this as a query expression.

Anyone care to help a fish bio out? Much obliged :)

View 5 Replies View Related

Defining The 3 Highest Values In A Series Of Fields

Nov 2, 2007

Hello Everyone,

I am in need of your vast array of knowledge and experience. I have been fighting with this Access report for a few days now, and I've finally decided to ask for your help.

I am running a report which provides a look at a set of 12 survey results. The 12 items are numerical in nature and are decimals with 2 decimal places. What I am trying to do is have Access automatically highlight the top 3 scores in one color, and the bottom 3 scores in another color.

So what I need is an expression that allows Access to discern the top 3 and bottom 3 from the series of 12 scores. in Excel you can identify the top score with this with the formula "Max(A1:A13)", but seeing as in Access we don't have the cell identifiers, this approach will not work.

I know that I will need to use conditional formatting in order to get the cells to highlight. I also see that there is "Max" and "Min" functions in Access as well, and I attempted to create and expression like this "=Max([field 1] AND [field 2] AND [field 3] AND, etc...)" with no luck. I also tried changing the "AND" to "OR", again without luck.

One thing that I should mention is that the report does contain a lot of other data, so I need to be able to apply whatever the best fix is, to only those 12 fields.

Unfortunately I am not accustomed to using code, and as a result I am unsure of how to input it properly. I am certainly open to code solutions, but I would also need a explanation of how to put it in properly.

The easiest solution for me, if possible, would be an expression that I can enter into the conditional formatting wizard to tell it to highlight the values.

If anyone has any ideas, I would appreciate it. I'll buy you a virtual beer :-)

View 5 Replies View Related

Forms :: Defining Colors On Form Control

Mar 30, 2014

I have to create a control on a form that will be able to change to one of ten colors, some of them are subtle shades. I will be doing this from vba on the control. I know how to do all of this except defining the colors.

I keep seeing the 3 part RGB(xx, xx, xx) etc. but I can't find the values for it that will give me the exact colors that I need!

I also saw a possibility of using a the hex equivalent for the color but I couldn't make that work?

View 2 Replies View Related

Access DB And Relationships

May 16, 2005

I'm creating a Members Area on a Trade Organisation website; I have an Access Database with all the members’ details including the name of the nominated representative for that member company. I am able to create a login for the nominated representative together with his/her chosen password but some of these member companies employ over 100 staff and what I would like to do is create a separate login for each member of staff, which is where I think that I need a table related to the Main table.

Just supposing one member has 100 staff and the member decides not to renew his membership, by deleting his entry in the Main Table all members of his staff would automatically have their access to the member’s area denied.

I just can't get my head around this relationship bit; I do have a cut down version (336kb) of the database if somebody would like to give it a go.


View 2 Replies View Related

Access Table Relationships

Jul 12, 2005

I'm using Access 2003. When I open the relationship window, one table linked to my main data table appears six times - the name is the same but with the addition of a number 1 -5. I can delete the five spare ones and drag a relationship to the main table but it keeps dissapearing.When I try to change the primary key in this table, it tells me that there is a relationship established which I must break - unfortunately, I can't see any relationship between the two tables in the relationship window. Any ideas?

John

View 1 Replies View Related

Question On Relationships In MS Access

Feb 26, 2007

Hi i need help with a relationship within access, i need to connect the two following together:

Loan (LoanMemNum, CopyNum, Ldate)
Video (Vcode, VTitle, Date Made, Director, Genre)

and i need the relationship from loan to video to be a one to many

Thanks

View 13 Replies View Related

Access/Active Directory Relationships

Apr 29, 2005

I know the is probably wishful thinking, but is it possible, and if so how, to link or create groups from Active Directory for use in Access.

View 1 Replies View Related

VB Frontend, Access Backend, No Relationships?

Apr 2, 2007

I am evaluating a program for the use of a customer. It's a VB frontend attached to an Access database.

The backend has no relationships. No table in the backend even has a primary key.

My question: Is this scenario acceptable in any way?

I tend to think not, but am unsure whether the design of the frontend application establishes relationships "on the fly". Even if so, the fact that there are no primary keys makes me think I should dismiss this application out of hand.

Thanks

View 8 Replies View Related

Access Novice - Table Relationships Help

Apr 26, 2005

Hi, I am currently stuck on making a working one to many table relationship, I will post what I have so far, what I am stuck on is forming a proper working relationship.


tblCustomers
CustomerID
Name
Address(street)
City
Region
PostCode
Telephone
Discount %

tblOrders
OrderID
ProductID
Description
Qty
UnitPrice

tblProduct
ProductID
Description
Room
Finish
UnitPrice
Stock Qty

The desired output is a working order form, that when, for example you enter the product ID into the appropriate field automatically brings the rest of the product fileds such as description and unit price. And when the customer ID is put into the appropriate field all of the relative customer info is shown.

I am new to access and I apologise if my post is unclear or incomplete, any input is appreciated.

Thanks in advance.

View 8 Replies View Related

General :: Access 2007 Many-to-many Relationships Export To Excel?

Jul 18, 2014

how to export Access' many-to-many relationships in excel.

My database is a Project portfolio management tool. One project has many different fields, some of which can only be single values (one-to-one, easy to export to excel) and many others are multiple values fields, built as many-to-many relations (through junction tables).

One usage that was not specified at database creation time was the ability to export the portfolio to excel, so non-access-savvy users can browse, filter, sort and play with the portfolio however they want.

If I build a report, it will contain as many sub-reports as there are junction tables, rendering it un-exportable to excel. A Form would have to be continuous, barring the use of sub-forms for the m2m relations.

Building a query will generate many lines per project (as many as the most populous multiple field), making the excel sheet nearly unusable (in my users opinion, and here, the client's the king).

The best route I have been exploring so far involves "transforming" the multiple fields, so a the different "rows" become additional "columns".

View 2 Replies View Related

Tables :: Access Integer Field To Text Keeping Relationships

Mar 12, 2013

I have a database that was built 5 years ago that has an auto field with an integer. There are relationships attached to this. I an rewriting it to simplify the database and I need to keep the relationships somehow. I want to make the auto field a text fields. How to work this out...

View 3 Replies View Related

:confused: Defining Tables :confused:

Oct 31, 2006

Hey guys i would really appricate some help

I have made severa databses before but im trying to make this one perfect and im curious, when defining tables should you include atributes about an entity that are static?

Its kind of hard to explain what i mean but for example in a shoe shop a staff member gets commision on what they sell (ie 5%) so when producing the table should a coloum be reserved for commision or should this be left out as it will be calculated later on in a querie and if so should i state this in the design section of my database?

any opinions would be greatly received as i have been reading books on sql and ERD's for days and havent been able to obtain any answers

cheers guys

mike

View 1 Replies View Related

Help With Relationships

Jul 18, 2005

Hi all. I really need help with this. Does anyone see a problem with my relationships , i have attached a copy.
Any help will be greatly appreciated
ClaireB

View 5 Replies View Related

Many-to-Many Relationships

Aug 2, 2005

I am new to database design and curious about relationships. In a hypothetical situation, if I have four tables: tblProducts, tblOrders, tblEmployees, and tblCustomers, how could the relationship be set up?

The Products are stored to keep track of the quantity on hand and the employees will also need to be tracked as to how many products they sell. Customers are recorded and Orders wrap up all three tables with the fields: OrderID, ProductID, EmployeeID, and CustomerID.

Would it make sense to say that many products can be bought by many customers and/or many employees can place many orders.

View 10 Replies View Related

Relationships - One-to-many?

Aug 16, 2005

Hi

I've selected a number of tables to the relationship window. When I drag the primary key on one table to the corresponding foreign key on another table, the link created is one-to-one. I want one-to-many. Why did it create one-to-one? How do I change this to one-to-many?

Thanks

View 4 Replies View Related







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