Need some help for my work database (1 Viewer)

Officeboy

Registered User.
Local time
Today, 02:27
Joined
Nov 10, 2009
Messages
66
Hello, i've just signed up and I hope you guys can help a newly promoted database desiger. My boss wants me to set up some fields in a table to do some fancy dancing.. Here's the issue

I'm designing a form for data entry where the reps will enter customer information. We dont want typos, so I aquried (dont ask) a list of all cities and counties in the state we are working in. I created a table with the city and the corrisponding county... here's what I want to happen..

When the CSR selects the city, the appropriate county will populate under the county tab.

This will need to be used to filter leads by COUNTY for future reports.

So....


Help?


Please?


Officeboy
 

AJordan

Registered User.
Local time
Today, 05:27
Joined
Mar 25, 2008
Messages
73
You will need to create a query based on your table that contains City and County. Such as criteria for city would be:

[Forms]![frmName]![cboCity]

This would return the correct County or counties with the selected city.

I also assume that the City and County selections will be done by use of drop down box, so when you create the drop down box for County the source should be the simple query above.
 
Last edited:

Officeboy

Registered User.
Local time
Today, 02:27
Joined
Nov 10, 2009
Messages
66
Thank you very much!
 

Officeboy

Registered User.
Local time
Today, 02:27
Joined
Nov 10, 2009
Messages
66
It's Still not working,
Clarification: Table - Oregon Cities, Colum 1= cities Colum 2= County

Customer table - Name, address, city, county state.

Take City wtih a drop down menu, select city and following entry "County" on customer table auto fills with correct county from Oregon Cities table from collum 2.....

Does that clarify?
 

Kryst51

Singin' in the Hou. Rain
Local time
Today, 04:27
Joined
Jun 29, 2009
Messages
1,896
Rename the "name" field in the customer table, that is an access reserved word.
 

boblarson

Smeghead
Local time
Today, 02:27
Joined
Jan 12, 2001
Messages
32,059
Rename the "name" field in the customer table, that is an access reserved word.

And not only that but...

it is the worst one to use as a field or object name because everything has a name property. And there is even the ability to put the name of a report on a report by using
=[Name]

which then would be screwed up by using Name as a field.
 

Officeboy

Registered User.
Local time
Today, 02:27
Joined
Nov 10, 2009
Messages
66
I was generalizing the name field, It's labed gContractor.
 

Officeboy

Registered User.
Local time
Today, 02:27
Joined
Nov 10, 2009
Messages
66
Still cant get it to work, I got a Query to do it, but when I ran the query through my table, it wasnt working
 

AJordan

Registered User.
Local time
Today, 05:27
Joined
Mar 25, 2008
Messages
73
Okay lets try again.
In Access Create a new query using the Query Design
Now select Table "Oregon Cities" and click add
Double Click the two fields ( Cities and County) to add them to your query
In the criteria line under city, enter: [Forms]![frmName]![cboCity]
"[frmName]" -- This is whatever you name your form
"[cboCity]" -- This is whatever you name the combo box for county on your form
NOW click the run button (should be an exclamation mark) it will prompt you to enter a city. Type the name of a city exactly as you have it in your table. The query should return the county associated with the city.
***************
Now all you have to do is make sure your names on your form matches the names on the query. AND YOU MUST MAKE SURE YOUR COMBO BOXES ARE PROPERLY BOUND. If they are not, even though you are selecting city in your combo box, you might be "really" passing the primary key through and you will get nothing.
 
Last edited:

Users who are viewing this thread

Top Bottom