A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using Combo Boxes



 
 
Thread Tools Display Modes
  #1  
Old June 11th, 2004, 10:27 PM
Praveen Manne
external usenet poster
 
Posts: n/a
Default Using Combo Boxes

Hi,

I have 2 tables;
1. Demo: ID, LastName, FirstName (fields in the table Demo) ID is the
Primary key.
2. Orders: Last Name, First Name, NoOfOrders .......

I chose Last Name and First Name as the primary fields because I want the
users of this application, be able to select the Names from a combo box
instead of selecting their ID's.

Here I have 2 problems,

1. when I select Last Name in the first combo, it should filter the values
in the First Name combo. ( I tried so many ways to do this, but I failed all
the times)
2. And when the First Name Combo got selected, I want the SSN textbox field
which is empty, should populate the correct SSN value from the first table.

Please Help

Thanks
Praveen Manne



  #2  
Old June 11th, 2004, 11:01 PM
Albert D. Kallal
external usenet poster
 
Posts: n/a
Default Using Combo Boxes

The problem here is that you should store only the iD in the orders. Once
you have the ID of who the order belongs to, then you don't need to copy the
first name, last name, SSN, address or whatever else you want.

The whole idea here is that you have a relational database. That means you
only need store the id.

Further, what happens if you have two people with the same name? So, while
your users will NEVER see the ID, that is what you should use.

If you built a combo box, it can search by last name, but store the id.

So, you best to actually build the combo box that returnees id, lastName,
FirstName, (and perhaps even show the SSN in the comb box.). That way, you
can select whatever name you want. When you do select the name, and store
ONLY that id, then all other information can be displayed on the screen..but
there is NO reasons to copy the data. So, you store the id, but users NEVER
see this id.

I explain how to do this he

http://www.attcanada.net/%7ekallal.m...000000005.html


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada

http://www.attcanada.net/~kallal.msn


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.