autofill mightmare

access_denied

New member
Local time
Today, 17:22
Joined
Aug 14, 2013
Messages
7
Hi

Im hoping some smart cookie on here can take 5 mins to solve a problem iv been struggling with for days ;(
Im new to Access so please explain as if I was a neanderthal, I wont take offence!

The database has 3 tables in it. AssetT, main one for all the assets, LocationT for all the locations, and PrinterT for the printers (which are technically assets)

I have done it like this, and tell me if its wrong, so that when I create a form which will be the main point at which people enter new data, so that if the asset is a printer it can be selected from a drop-down list and all the other related info will be auto filled in.

So far I have a form that is working almost as it should but when I select a printer, it then fills in the other data but for some reason it will not save that data with the Asset record in the AssetT table.

I suspect iv set up the fields wrong and possibly needed to use this magical thing called a DLookup although I dont even know how to do it for a single field let alone multiple fields.

Sorry to ramble on, its hard to explain so iv attached a copy of the database that may explain it a lot better.

Thanks in advance
 

Attachments

So far I have a form that is working almost as it should but when I select a printer, it then fills in the other data but for some reason it will not save that data with the Asset record in the AssetT table.
You need some code in the after update for the printer model control to fill in the data in the other controls, and ofcause change the controlsource for these control to the relevant fields in the AssetT table.
The controlsource you have now for these control are pointing to the PrinterT table.
But it is not the normal way to do it.
The normal way is only to store the PrinterId from the PrinterT table in the AssetT table, then it is following the requirement for normalized database structure.
 
Thanks for the reply, I think iv sorted it by leaving the tables as they are and using forms to show all the data I need in one place.

I know its not the best or even correct way to do it but i was asked by my boss to make a database with no knowledge whatsoever so have been bummberling along using trial and error.
 

Users who are viewing this thread

Back
Top Bottom