[newbie] Is this the right way to do it? (1 Viewer)

Loranga

Registered User.
Local time
, 23:42
Joined
Sep 14, 2010
Messages
13
Wohooo! I think I made it, my first working project :)

What I wanted to achive was a form where I could make three choices with comboboxes and based on the choices made, display the corresponding value from the table in a textbox.

My question to you guys is this the "correct" way to do it or should I have done something different?

Right now I think I'll go and grab a beer.
 
Last edited by a moderator:

DCrake

Remembered
Local time
Today, 07:42
Joined
Jun 8, 2005
Messages
8,632
This in known as cascading combos, and yes this is the preferred way to do this.
 

boblarson

Smeghead
Local time
, 23:42
Joined
Jan 12, 2001
Messages
32,059
Sorry to be the bearer of bad news but no it is not the correct way to do it.

You have your combo boxes pulling from the same place you are going to be populating. You will never have the right combination for anything beyond what you currently have.

You should have a table for

tblVendors
VendorID - PK
VendorName

tblEquipment
EquipmentID - PK
EquipmentName
EquipmentModel

tblVendorEquipment (junction table)
VendorEquipmentID - PK
VendorID - FK
EquipmentID - FK


Then you have the combo boxes pull the data from those and then you bind the products table to the form like you have.
 

boblarson

Smeghead
Local time
, 23:42
Joined
Jan 12, 2001
Messages
32,059
So yes, the cascading combos, like David says - are correct in the technical way they were used. But no, the design and where they are pulling from is not right as indicated in my previous post. Had to clarify that.
 

DCrake

Remembered
Local time
Today, 07:42
Joined
Jun 8, 2005
Messages
8,632
Bob
I never want as far as examining the code just the results of the form.
Anyway did the accdb open alright for you, it was a bit suspect on my machine. Had to C&R first. Have removed attachment for safety's sake.
 

boblarson

Smeghead
Local time
, 23:42
Joined
Jan 12, 2001
Messages
32,059
Bob
I never want as far as examining the code just the results of the form.
Anyway did the accdb open alright for you, it was a bit suspect on my machine. Had to C&R first. Have removed attachment for safety's sake.

It opened for me but I think there may either be a corrupt table or it is one that, due to regional differences, couldn't be opened.
 

Loranga

Registered User.
Local time
, 23:42
Joined
Sep 14, 2010
Messages
13
Hi,
Thanks for the input.
The design was just a single table for me to work on, trying to get the combobox and query to work. But with the help from your input I'll change it later on.

About the file, I don't have any problems you deleting it, but I think boblarsson is on to something when he wrote about reginal differences.
I've only worked with this file (and posting it) from the computer beloning to my employer wich due to company restrictions is kept very clean. (daily virus scan, no admin rights etc..). Anyway thanks for the help.
 

Users who are viewing this thread

Top Bottom