Yes My Sql Newby Nuss Is Annoying =(

Nov 14, 2006

Heya, I know this is probably something simple as I know I have done sql problems like this before. However, I am wanting to show cars which have the same name but are of different colours (without duplicates), I figured I could just use a SELECT DISTINCT? However, when I do this it just brings up one car name and one colour when there are multiple colours.

SELECT DISTINCT car.carname ,car.colour
FROM cars;

I am guessing its because the SELECT DISTINCT statement is applied to both the name and colour.

If somebody could just tell me what I am doing wrong because I am guessing its something simple yet I am too frustrated to see what it is now!

Thanks =)

View Replies


ADVERTISEMENT

Newby Needs Help

Jan 24, 2007

Hello all, I've been reading through threads and there is alott of very good information on here, and seems to be some very knowladgeable people. So my question will probably be easy to answer.

I have a database of part serial numbers. I have created a query and a form to pull out all serial numbers for an inputed part number.

What I need it to do now is highlight any repeated serial numbers. How do I go about this?

I am thinking it will be a conditional format in the form itself to change font color but I dont know how to make it compare the values.

Any help would be great.

View 2 Replies View Related

Newby-Help With Relationships

Nov 4, 2004

Hi,

Seems like the more i get into reading the more confused I get in this basic
fundamental. I just need it explained really clear and basic, then hopefully it will enter the subconcious and I will be able to proceed :)

I am trying to build with Access XP in 2000 version a small program for a small medical office.

Patients are offerd various services and they have vists to take advnatage of them. They are charged for the services and run an account which is then paid, leaving a balance.

I want it all to be entered via forms for older non computer literate staff.

I have done the main table okay with all the info we will need and I have messed around with the other 3 tables I think I need.

1. To enter the Services offered a description and fee.
2. Enter when they visit and what services they have and fees with total
3. When they make a payment and balance owing.

They are one to many relationships, correct?

For a start am I on the right track ?

My confusion is setting up the relationships especially what field/s has to be linked to fields in the other tables to make it work.

Is there a rock solid rule where a certain field has to be in each table and has to be linked ?

These are the first fileds in my MAIN TABLE..

Patient ID Auto Number Primary
Medicare Number Can be blank
Last Name Text
First Name Text
Address Text

SERVICE TABLE (Primary?)

Service Type /Combo- Accuncture-Massage-Herbs-Vitamins-Other
Description of Service Text
Charge for Service Text

VISIT (Primary?)

Date and Time of Visit: In case 1+ visits in one day
Reason for Visit

ACCOUNT

Date
Service Charges
Payments
Balance

I know it is basic but I need to get over this block..

Thanks in anticipation of help

Oz

:confused:

View 2 Replies View Related

Newby Needs Help (desperately)

Jun 9, 2005

I have this form which shows the contents of a table... however, this table is linked to another table. How do I show the results of this linked table in the form?

Table_person
- Table_personID
- PersonFirstName
- PersonLastName
- EmployerID (linked to table below)

Table_Employer
- EmployerID
- FirmName
- ....

Now - the form should look like this:
First name: John
Last name: Doe
Firm: John Industries (selected in a dropdown box)

Table_Employer would contain
1 John Industries ...
2 Hank Industries ...

You catch my drift right?
How do I link these two tables in a form? How do I get the correct Firm to be selected in a dropdown box?

Any help is appreciated!!
Jazz

View 7 Replies View Related

Can Anyone Help An Access Newby ?

Jun 4, 2007

Hi All,

I am a complete novice with MS Access and am trying to find my way through our website database. ((URL address blocked: See forum rules)).

What I am trying to do is set up a search form to use offline so that it easier for us to trace animals that we have rescued.

I have the form all set up and it seems fine except that two of the fields I have on the form show numbers instead of the full details.

I think that what I need to do in those fields, is "point" them to another table in the DB so that they can "lookup" the relevant data in those tables and display the text instead of just the numbers.

I have tried searching through the MS Access Manual but to me, most of it may as well be written in a foreign language !

Hopefully t is a simple task that can be easily explained !

Regards

Paul

View 5 Replies View Related

Annoying Problem.

Oct 7, 2005

Basically i have a form which logs error corrections. The users enter a 'date received'. My user has now asked to have a date due to automatically be calculated by adding six days. I have done this with no problem:

=DateAdd("y", +6, [date received])

My form is not unbound, this date due field is the only unbound field i have. This date does not need to be saved in the table, just to appear when the user opens the form, which it does.

The problem which i am having is that i have a report which runs of a query, printing out the error correction, when the user types in the auto number required. The records added after i put the date due field, will not print out and when i run the query and type in the auto number of these records they do not appear...yet they are stored in the table. Obviously this is due to the 'date due' field, but im not sure how.

I really don't understand what is wrong. Could someone please give me an insight into what maybe wrong or tell me what to search for in the forum, because the searches i have tried have not come up with anything.

Thank you

View 1 Replies View Related

Annoying Parameter

Apr 6, 2005

I have a SQL query in which I have created a parameter to be entered by the user.

This works ok, however... everytime the user is asked to enter the parameter twice...

How can I stop access from asking users the second time?

Cause... the way I see it, one time should be enough and the query itself doesn't state the line in which the parameter is twice either...

Thx!

View 5 Replies View Related

Annoying Combos

May 27, 2006

Hi There,
I know this subject has been beaten to death, but I have searched the forum and cannot find a post relating to my particular problem.
I have three cascading combos on a subform that work fine and dandy when I open the subform on it's own, but when I open the main form that the subform is embedded into, I get the following message [IMG]cascade[/IMG]
I know I am missing something simple.
Any advice would be most welcome.

View 2 Replies View Related

Newby Link Price Fields

Feb 20, 2006

So I have a table "InventoryTracker", with one field lookup set to list (drop down) and the source is another table "inventory", field "Item". This works good and all the items that I enter in the "inventory" table are available from the "InventoryTracker" table. Both "inventory" and "InventoryTracker" have a field called price.

Heres what I want to have happen.
When I select a item from the drop down list menue in "InventoryTracker" it automatically fills in the "InventoryTracker" price based on the price from the "inventory" table (for the item with the same name, the one I just selected). This has to be fairly straitforward, I can do it in excell, but not acess.

Can anyone help a newby out?:rolleyes:

View 2 Replies View Related

Annoying Query, Yet Simple? - Please Help.

Jul 29, 2005

Hi guys,

A friend of mine has recently created a simple database which holds details of childrens story books. It logs the name of the Author, the storyline, its character etc in various tables...

He's currently creating some simple queries for his database. However, there is one query which neither he nor I can figure out, I'll try to explain to the best of my ability.

Basically, the 'story line' field in his database explains the basic plot of the book, some of the plots have the words "son", "dad", "father" and "boy" in them.

Now, he wants to create a simple query, which looks up and displays data which contains the keywords "dad", "father", "son" etc in them. So far he's tried...

Like "*Son*" Or Like "*Father*" etc...

This worked, briefly. The query was bringing up storylines with both contained the words "son" and "father" , which is correct. However, the query was also bringing up story lines with the word "song" in them, or any word which remotely related to one of the keywords, but didn't contain the exact criteria in the query (son, father etc).

In basic terms, how do you create a query which only brings up words that match the EXACT query criteria? In this case, 'Son' or 'Father' or 'Dad' etc? Rather than words which only briefly relate to the criteria, such as 'Song' or 'Fat' etc?

Thanks for your cooperation, feedback and examples would be highly appreciated.

Thanks all,

Jonathan.

View 4 Replies View Related

Annoying Popup Messages

Jun 6, 2007

I have no idea wheather this is supposed to go in Queries or Forms, so feel free to move this to either.

Here's my problem:

I made a query that looks at three text boxes on a form. I'm not sure how to set up the buttons correctly so I just bluffed it (like always :) ). Every time I run the query it keeps wanting me to re-enter the data that it was supposed to look at anyway! If you need more info, just ask. Thanks.

Anonymous_354

P.S.: I'm really new at this. I just learned about Access a week ago.

P.P.S.: I use Access 2000

View 14 Replies View Related

One Annoying Duplicate Record Problem!!!

Aug 4, 2005

I have a search form passing text from unbound controls to a query. These two fields (AuthorName & Title) of the query are from two different tables (Authors & Papers) set up in a many to many join. The 3 dummy records I am using are as follows:

Record 1
AuthorName: Smith (Author 1)
Title: SmithTitle

Record 2
AuthorName: Smith (Author 1)
AuthorName: Jones (Author 2)
Title:SmithJonesTitle
(i.e. two authors for this record)

Record 3
Author: Jones (Author 2)
Title: JonesTitle

If I stick in 'Jones' into the Author field and 'JonesTitle' in the Title field I correctly get 1 result from the query (record 3). However, oddly, if I put in Smith and SmithTitle I get two records (2 x record 1)!!!!! There aren't two records!!! Similarly if I leave both blank I get all the records and again there is a duplicate of the Smith record (and only this one is duplicated!)

The query criteria are:

[AuthorName] Like [Forms].[Search]![Author] & "*"
[Title] Like [Forms].[Search]![Title] & "*"

Any ideas???

Thanks

View 5 Replies View Related

Another Newby Question - Linking Multiple Rows To One Form

Jun 9, 2005

I have this form which shows an order.... linked to this order are the client, the principal company, and the company that carries out the order. The information for these three companies are all stored in one table (since the information is very similar).

Tables look like:
tblOrder
- OrderID
- ClientID * linked to CompanyID
- PrincipalID * linked to CompanyID
- Contractor (company that carries out the order) * linked to CompanyID
- Date
- ...

tblCompany
- CompanyID
- CompanyName
- CompanyAddress
- ...

An example is for instance:
tblOrder
- 1, 1, 2, 3, 01-01-2005

tblCompany
- 1, Comp A, 200 A Lane, LA,
- 2, Comp B, 100 B Lane, NY
- 3, Comp C, 300 C Lane, SF

So, on the form it should read:

Date of contract: 01-01-2005
Client: Comp A - 200 A Lane, LA
Principal: Comp B - 100 B Lane, NY
Contractor: Comp C - 300 C Lane, SF

I understand how to make one link to a form... but how do I make three links from the same table?!?!?

Any help is appreciated!
Jazz

View 1 Replies View Related

Currency Field Formatting - Simple But Annoying Issue!

Jan 10, 2007

Hi All,

This is my first post so can I just say how great and useful this forum has been for me since I joined! I have found pretty much everything I have wanted without having to ask, so thank you everyone!

I am only beginning with Access at the moment, as I try to implement some improvements to the way my company works!

I have one really simple, but annoying issue at the moment and I cannot find the answer anywhere!

I have a currency filed in my table. I want to format it in USD, but USD is not available in the format options, just £ and €. I cannot see where the hell I get the USD $ format from?

I know this is probably well simple and I am being a plum!

View 3 Replies View Related







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