39,476 Members 1,490,592 Posts
BRISKODA - The Skoda Forums  

MS Access database

This is a discussion on MS Access database within the The Tech Shed forums, part of the Members Area category; Are there any Access geniuses about?? I'm trying to build a waste transfer database at work and I can't get ...


Go Back   BRISKODA - The Skoda Forums > Members Area > The Tech Shed

Pronounced "bris-skoda", a brisk skoda.

Register Gallery FAQ Members List Calendar Mark Forums Read
Old 05-08-2008, 16:51   #1
Briskodian
 
tdirob's Avatar
 
Join Date: Aug 2006
Location: Wrexham
Posts: 1,193

Members Car: Golf GT TDi
Thanks: 25
Thanked 34 Times in 32 Posts
MS Access database

Are there any Access geniuses about??
I'm trying to build a waste transfer database at work and I can't get my head around how to autofill fields. I'll do my best to explain the problem...

I've got two tables, a waste producers and waste types table. Waste producers can have several waste types and the waste types can be relevant to several waste producers.

When we are entering information on a form (waste transfer notes), I would like to have a drop down box that we can select the waste producer from, I would then like a second drop down box for the waste type to show only the waste types for that waste producer (so we aren't scrolling through a list of every waste type)

Can anyone point me in the right direction? as I am well and truly stuck
__________________

Golf GT TDI - Standard (at the minute)
tdirob is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote

Find out about Freedom to remove these ads.

Old 05-08-2008, 16:58   #2
Briskodian
 
Babs's Avatar
 
Join Date: Jul 2006
Location: Newport/Preston
Posts: 4,153

Members Car: Skoda Octavia vRS
Thanks: 216
Thanked 139 Times in 123 Posts
Re: MS Access database

What fields do each of the tables have? It sounds to me like you may need a third table
Babs is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 05-08-2008, 17:30   #3
Briskodian
 
cheezemonkhai's Avatar
 
Join Date: Jan 2006
Posts: 15,665

Members Car:
Thanks: 123
Thanked 527 Times in 488 Posts
Re: MS Access database

Is this for a company of any serious size?

If so I suggest using something a bit more substantial than access.

You could do an SQL query to populate the box eg:

populate the manufacturers from a table of them, then do something like

SELECT <waste types> FROM <tablename> WHERE <manufacturerid> = <id>

This would populate the list for you.

You would need a table to combine which manufacturers create which waste types. The same could be done to allow you to say which types of waste a company will handle when taking it from you too.

You would need:

- Manufacturer table including an ID number
- Waste type table including an ID number
- A table linking these two, so which manufacturer ID creates which waste ID's
__________________
Cars make CO2 and trees absorb CO2. By driving your car you're feeding a tree and helping the environment.

cheezemonkhai is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 05-08-2008, 17:37   #4
Briskodian
 
tdirob's Avatar
 
Join Date: Aug 2006
Location: Wrexham
Posts: 1,193

Members Car: Golf GT TDi
Thanks: 25
Thanked 34 Times in 32 Posts
Re: MS Access database

I have actually got quite a few tables but I was trying to make it a bit simpler to understand (I probably over simplified it)

The idea of the database is to have a main table for waste transfer notes that is populated by a user from a form. I want all the data to be accurate/consistant so I would like to use a number of drop down boxes that lookup information from other tables such as customers, customer sites, waste types, disposal site, driver etc etc. If I can get the drop down boxes to reduce the number of options after a selection in one of the previous boxes, it would cut down on time and mistakes.

I have a customer table with the usual info on. Name, Address, Site Address etc. I then have a seperate table of waste types that relates site names to specific waste types. Eg In-Vessel Composting can produce compost and leachate so there are two entries.

Therefore on the form when I select In-Vessel Composting from the drop down box, I want the following 'Waste Type' drop down box to only have Compost and Leachate in it.

Hopefully this makes a bit more sense...
__________________

Golf GT TDI - Standard (at the minute)
tdirob is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 05-08-2008, 17:43   #5
Briskodian
 
tdirob's Avatar
 
Join Date: Aug 2006
Location: Wrexham
Posts: 1,193

Members Car: Golf GT TDi
Thanks: 25
Thanked 34 Times in 32 Posts
Re: MS Access database

Quote:
Originally Posted by cheezemonkhai View Post
Is this for a company of any serious size?

If so I suggest using something a bit more substantial than access.
We have about 20 drivers and do about 1500-2000 loads a month - there will be same number of entries on the database

I did debate an SQL database however I'd have to learn SQL before I could do that

I also thought that if I design and test the database in Access, I can upsize it at a later date to an SQL database
__________________

Golf GT TDI - Standard (at the minute)
tdirob is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 05-08-2008, 19:18   #6
Briskodian
 
cheezemonkhai's Avatar
 
Join Date: Jan 2006
Posts: 15,665

Members Car:
Thanks: 123
Thanked 527 Times in 488 Posts
Re: MS Access database

If you are doing 2000 records a month, I would get somebody to design it properly for you in an SQL system.

Access will not IMHO like you trying to do lots of work on your data a couple of years down the line.

Also you can use my SQL statement in access to populate the box.
__________________
Cars make CO2 and trees absorb CO2. By driving your car you're feeding a tree and helping the environment.

cheezemonkhai is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 05-08-2008, 19:25   #7
Briskodian
 
cheezemonkhai's Avatar
 
Join Date: Jan 2006
Posts: 15,665

Members Car:
Thanks: 123
Thanked 527 Times in 488 Posts
Re: MS Access database

A very simple and probably not optimal one is:

Customer Table, Waste Types and Customer/Waste link table.

You would have a unique ID number for customer table and waste types and then in the link table you want to store a list of customer ID vs waste ID

eg is your customer is number 1 and your two waste types 7 and 8

1 --> 7
1 --> 8

would be stored in the link table.

This would then fill the drop down box by taking the user input for the company name and relating it to the ID number (1) which can be done by the drop down list. Then return all the numbers (waste IDs) in the linker table. GO through these one at a time looking for the ID number in the waste type then in the drop down list you can store the ID (hidden index) and the name as a string.

This would then when selected store the number.
__________________
Cars make CO2 and trees absorb CO2. By driving your car you're feeding a tree and helping the environment.

cheezemonkhai is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
The Following User Says Thank You to cheezemonkhai For This Useful Post:
tdirob (06-08-2008)
Old 06-08-2008, 11:46   #8
Briskodian
 
tdirob's Avatar
 
Join Date: Aug 2006
Location: Wrexham
Posts: 1,193

Members Car: Golf GT TDi
Thanks: 25
Thanked 34 Times in 32 Posts
Re: MS Access database

Unfortunately, the money isn't there to get someone in at the minute.

There is software out there that will do what we want, but it isn't a module system and we will end up paying a lot of money for modules that we won't use (and it was about £20k for a multi user package).

We also looked at getting at systems that links to handheld computers our drivers use (like the delivery company's use) therefore cutting out the paperwork and data entry but there is nothing on the market that is suitable at the minute and would be a huge sum of money getting something altered to our requirements.

As long as I can make a stable database that covers our requirements for the following 12-24 months I will be happy

Thanks for you help cheezemonkhai, you've given me a few good ideas
__________________

Golf GT TDI - Standard (at the minute)
tdirob is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 06-08-2008, 11:57   #9
Briskodian
 
MikeF's Avatar
 
Join Date: Apr 2005
Location: north west uk (bury)
Posts: 1,337

Members Car:
Thanks: 54
Thanked 37 Times in 28 Posts
Re: MS Access database

hmm, i would have said access is absolutley fine for your needs, what your suggesting seems pretty reasonable and easy to implament.

Also, for the handheld computer thing Ive done some stuff with text messaging in the past whereby you can get access to text, through a site that does messaging(over internet) to the end user and although ive never used it you can also text the other way, costs last time i looked were 10p per message. Getting the user to adopt a standard text format could be an issue and access would have problems sorting any deviations althoug it would be ok with a little thought.
MikeF is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 06-08-2008, 12:00   #10
Briskodian
 
robmawer's Avatar
 
Join Date: Jan 2003
Location: Rochdale
Posts: 12,476

Members Car: Octavia 1.6 Ambiente
Thanks: 2
Thanked 74 Times in 67 Posts
Re: MS Access database

Quote:
Originally Posted by tdirob View Post
Unfortunately, the money isn't there to get someone in at the minute.
What's your budget? SQL backend with a form front-end can be done to a decent standard by most hobbyists, you might find someone on here would knock something up for you for less than £100.


Quote:
We also looked at getting at systems that links to handheld computers our drivers use (like the delivery company's use) therefore cutting out the paperwork and data entry but there is nothing on the market that is suitable at the minute and would be a huge sum of money getting something altered to our requirements.
If you had an SQL back-end you could then create web pages/web services to front that which would then be available to any device which has a browser and interweb connectivity - though whether this would be any use to your handheld devices would depend on what the devices were capable of...
There's a chap on here under the user name DaveU who runs a company providing IT/telecoms solutions to the logistics industry - not sure if it might be worth seeing if there's anything he could do to help meet your requirements?


Rob.
__________________
robmawer is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 06-08-2008, 12:03   #11
Briskodian
 
cheezemonkhai's Avatar
 
Join Date: Jan 2006
Posts: 15,665

Members Car:
Thanks: 123
Thanked 527 Times in 488 Posts
Re: MS Access database

Quote:
Originally Posted by MikeF View Post
hmm, i would have said access is absolutley fine for your needs, what your suggesting seems pretty reasonable and easy to implament.
Access will be fine for 12-24 months if done correctly, however systems always run a lot longer than designed so a few years down the row things will start to crawl, especially if more than one person is accessing the data at the same time.

Far better to do an SQL backend, knock up a web interface that is mobile phone/PDA compatible and let the drivers update it from a modern phone.

You can then have a real web page to enter any that were missed and do all the admin for the office.

I'd say that's under £1k total.
__________________
Cars make CO2 and trees absorb CO2. By driving your car you're feeding a tree and helping the environment.

cheezemonkhai is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 06-08-2008, 12:13   #12
Briskodian
 
robmawer's Avatar
 
Join Date: Jan 2003
Location: Rochdale
Posts: 12,476

Members Car: Octavia 1.6 Ambiente
Thanks: 2
Thanked 74 Times in 67 Posts
Re: MS Access database

Quote:
Originally Posted by cheezemonkhai View Post
Access will be fine for 12-24 months if done correctly, however systems always run a lot longer than designed so a few years down the row things will start to crawl, especially if more than one person is accessing the data at the same time.


If it's one person's database then Access is passable, if it has more than one user or is used over a network or needs to not lose data, SQL would be a much better bet. And given that both MySQL and MS SQL Express are both free, there are even fewer excuses...


I personally wouldn't rely on text messaging for sending update messages back to base - they're not guaranteed delivery and have latency which can run into days, so you'll either have well-behaved drivers getting pulled up because they sent a text and it wasn't received, or slacker drivers using it as an excuse for not sending back the updates...


Rob.
__________________
robmawer is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 06-08-2008, 12:17   #13
Briskodian
 
tdirob's Avatar
 
Join Date: Aug 2006
Location: Wrexham
Posts: 1,193

Members Car: Golf GT TDi
Thanks: 25
Thanked 34 Times in 32 Posts
Re: MS Access database

The drivers would need a purpose made machine as the paperwork has to comply with the duty of care regulations and we would have to supply a printer so tickets could be printed where required (sites without internet access).

Hmm. How much maintenance does an SQL database require and how easy is it to add additional information/tables in the future?

Maybe I should look at SQL stuff before designing my database on access. Any hints as to where I can learn the basics?
__________________

Golf GT TDI - Standard (at the minute)
tdirob is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 06-08-2008, 12:34   #14
Briskodian
 
robmawer's Avatar
 
Join Date: Jan 2003
Location: Rochdale
Posts: 12,476

Members Car: Octavia 1.6 Ambiente
Thanks: 2
Thanked 74 Times in 67 Posts
Re: MS Access database

Quote:
Originally Posted by tdirob View Post
The drivers would need a purpose made machine as the paperwork has to comply with the duty of care regulations and we would have to supply a printer so tickets could be printed where required (sites without internet access).
Cheap laptop with wireless mobile and a printer, running off 12V supply in the van?


Quote:
How much maintenance does an SQL database require and how easy is it to add additional information/tables in the future?
In theory, none - you don't have to do things like compress it and that, it just runs. So really, in terms of day-to-day maintenance it's just a matter of checking that your replication/backups are working so that you aren't vulnerable in the event of a server failure.


Quote:
Maybe I should look at SQL stuff before designing my database on access. Any hints as to where I can learn the basics?
SQLCourse - Lesson 1: What is SQL? could be a good starter. Then from there you just need to figure out which version of SQL you want to go with and learn about that...


Rob.
__________________
robmawer is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
The Following User Says Thank You to robmawer For This Useful Post:
tdirob (06-08-2008)
Old 06-08-2008, 14:48   #15
Briskodian
 
cheezemonkhai's Avatar
 
Join Date: Jan 2006
Posts: 15,665

Members Car:
Thanks: 123
Thanked 527 Times in 488 Posts
Re: MS Access database

Agree just get somebody in to give it a tidy up once a year, make sure you have your backups.

If you craft your pages correctly, the lorry driver could fill them in from an N95/iPhone on the move in the browser and all the data generated would be fine.

Laptop as rob said is the other option. Could even add a cheap thermal printer to do the confirmation receipts for the company
__________________
Cars make CO2 and trees absorb CO2. By driving your car you're feeding a tree and helping the environment.

cheezemonkhai is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 09-08-2008, 08:15   #16
Briskodian
 
mbames's Avatar
 
Join Date: Apr 2005
Location: Weymouth, Dorset
Posts: 1,620

Thanks: 0
Thanked 71 Times in 63 Posts
Re: MS Access database

Don't forgot you need to purchase a SQL server license too... that will come it at a quite a few quid too....

In my last job we used to do a lot of Pocket PC/Palm sync stuff to backend SQL Server - normally using Sybase Mobilink as the sync engine. Wifi use when in the school building, and bluetooth/gprs when outside if wifi coverage.

We used to use b/t brother thermal printers when we did some work for the Dorset Police.
mbames is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 09-08-2008, 09:39   #17
Don't talk, drive!
 
ncarring's Avatar
 
Join Date: Feb 2003
Location: The B roads of Britain
Posts: 12,965

Thanks: 17
Thanked 96 Times in 79 Posts
Re: MS Access database

The problem with using SQL Server (Express or otherwise) or MySQL is that there is no nice IDE for front end development so you need to either use Access as a front end, or learn PHP or Java (or some other thing) in order to interface to MySQL.

I would do as you had originally planned - prototype in Access, then move to a different back end as and when you have refined your database structure, and are ready for bigger things.

To answer the original question, follow Mark's suggestion of a link table to link producers and types. Build a query that retrieves from that table using the content of the producer combo as the criteria. (the syntax is something like [forms]![formname]![comboname]). Then put the product type combo box on the form, and as the control source for the form, specify the query you just built. The only trouble is you may need an event procedure to blank it out and refresh it, otherwise if you go back and change producer, the contents of the product type combo will not change.

Have a look here: Access Topics: Tutorials - this covers the basics. There are lots of others if you Google for "acess forms tutorial".
__________________
Nick

North Wiltshire RoADAR
ncarring is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
The Following User Says Thank You to ncarring For This Useful Post:
tdirob (10-08-2008)
Old 09-08-2008, 10:06   #18
Briskodian
 
PEMBO's Avatar
 
Join Date: Jun 2006
Location: Middlesbrough, home of legends :P (not the worst place in the UK at all...honest guv)
Posts: 3,049

Members Car: 1.4 16V Fabia Comfort
Thanks: 176
Thanked 100 Times in 30 Posts
Re: MS Access database

Quote:
Originally Posted by tdirob View Post
Are there any Access geniuses about??
I'm trying to build a waste transfer database at work and I can't get my head around how to autofill fields. I'll do my best to explain the problem...

I've got two tables, a waste producers and waste types table. Waste producers can have several waste types and the waste types can be relevant to several waste producers.

When we are entering information on a form (waste transfer notes), I would like to have a drop down box that we can select the waste producer from, I would then like a second drop down box for the waste type to show only the waste types for that waste producer (so we aren't scrolling through a list of every waste type)

Can anyone point me in the right direction? as I am well and truly stuck
Looks like your after a lookup table
__________________
1.4 16v Comfort 2001 - Average 40.21 MPG (REAL) over 14,909 miles

YAR! Subliminal Advertising..Buy PEMBO a PINT!!!! YAR!
PEMBO is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 09-08-2008, 10:27   #19
Briskodian
 
matchmaker's Avatar
 
Join Date: Aug 2004
Location: Stirling
Posts: 2,794

Members Car: Black Octavia vRS
Thanks: 24
Thanked 20 Times in 18 Posts
Re: MS Access database

Quote:
Originally Posted by cheezemonkhai View Post
If you are doing 2000 records a month, I would get somebody to design it properly for you in an SQL system.

Access will not IMHO like you trying to do lots of work on your data a couple of years down the line.

Also you can use my SQL statement in access to populate the box.
Access is the most unreliable application in MS Office, IMHO. I wouldn't use it for any remotely heavyweight use!
__________________
Alan

"Darth" - Black Magic Octavia VRS with Forge DV, BMC CDA induction kit, Milltek cat, Supersprint exhaust, Xenons, ESP, cruise, parking sensors and Kumho 225/45/17 tyres Been to Star sufficient bhp & ample lb/ft All time low - 7.8 mpg
matchmaker is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 09-08-2008, 11:39   #20
Briskodian
 
robmawer's Avatar
 
Join Date: Jan 2003
Location: Rochdale
Posts: 12,476

Members Car: Octavia 1.6 Ambiente
Thanks: 2
Thanked 74 Times in 67 Posts
Re: MS Access database

Quote:
Originally Posted by ncarring View Post
The problem with using SQL Server (Express or otherwise) or MySQL is that there is no nice IDE for front end development so you need to either use Access as a front end, or learn PHP or Java (or some other thing) in order to interface to MySQL.
This is where Visual Studio Express Editions come in - design the DB structure using Management Studio, then integrating that into either a standalone Windows App or a Web Page/Web Service can be pretty much a case of dragging and dropping (hurrah for DataGrids), and you don't need to know enough of a programming language to write an app from scratch as the IDE is very helpful in this respect. And, best of all...totally free.

Usual disclaimer about ease-of-use being subjective applies.


Rob.
__________________
robmawer is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 09-08-2008, 13:41   #21
.:Robbo:.
 
Robshaw's Avatar
 
Join Date: Sep 2006
Location: Swindon or Bournemouth
Posts: 2,417

Members Car: A Clio 1.2 16v
Thanks: 215
Thanked 121 Times in 103 Posts
Re: MS Access database

If you post up some screen shots or send me a PM...

I will do my best to fix it and explain it for you.
__________________
Current:
Renault Clio 1.2 16v Dynamic
Sold:
Honda Civic Type R
Skoda Fabia vRS
Robshaw is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 11-08-2008, 12:46   #22
Briskodian
 
cheezemonkhai's Avatar
 
Join Date: Jan 2006
Posts: 15,665

Members Car:
Thanks: 123
Thanked 527 Times in 488 Posts
Re: MS Access database

Quote:
Originally Posted by ncarring View Post
The problem with using SQL Server (Express or otherwise) or MySQL is that there is no nice IDE for front end development so you need to either use Access as a front end, or learn PHP or Java (or some other thing) in order to interface to MySQL.

I would do as you had originally planned - prototype in Access, then move to a different back end as and when you have refined your database structure, and are ready for bigger things.

To answer the original question, follow Mark's suggestion of a link table to link producers and types. Build a query that retrieves from that table using the content of the producer combo as the criteria. (the syntax is something like [forms]![formname]![comboname]). Then put the product type combo box on the form, and as the control source for the form, specify the query you just built. The only trouble is you may need an event procedure to blank it out and refresh it, otherwise if you go back and change producer, the contents of the product type combo will not change.

Have a look here: Access Topics: Tutorials - this covers the basics. There are lots of others if you Google for "acess forms tutorial".
Sorry for the lack of reply, a fairly self inflicted ban and other things to do all weekend meant that I've not bee on until now

MySQL CC will let you do maintainance and there are plenty of SQL design tools out there which will creat a design then do an SQL DUMP into the DBMS to create it.
__________________
Cars make CO2 and trees absorb CO2. By driving your car you're feeding a tree and helping the environment.

cheezemonkhai is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 11-08-2008, 13:35   #23
Briskodian
 
tdirob's Avatar
 
Join Date: Aug 2006
Location: Wrexham
Posts: 1,193

Members Car: Golf GT TDi
Thanks: 25
Thanked 34 Times in 32 Posts
Re: MS Access database

I was busy scraping wallpaper paste at the new house so unfortunately I didn't get time to look at the database over the weekend.

Having talked to the boss about it, we've decided to go ahead with the access database for now. It will give me experience of designing and developing a database and it will also allow us to have a working database while I learn more about SQL.

I'm actually quite happy as I enjoy a good challenge and i'll learn loads about access through trial and error. I expect there will be a lot of head scratching over the next week or so as I try to work out how to link tables and forms but I'm sure someone on here will be able to help. Thanks for all your help so far everyone

edit:It also means that I will have designed another important system for the company which should help me get another pay rise next year!
__________________

Golf GT TDI - Standard (at the minute)
tdirob is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 11-08-2008, 14:23   #24
Briskodian
 
cheezemonkhai's Avatar