PC Review


Reply
Thread Tools Rate Thread

auto fill field in a table by filling one field in list box

 
 
Jeffrey Reed
Guest
Posts: n/a
 
      21st Oct 2003
I have a two tables; users_table and orders_table.

users_table has the following colums: userid, username.

orders_table has the following colums: orderid, userid,
username.

orders_table has a list box that displays the name field
from the users_table. i want my query to fill in the
userid field from the users_table when i select the
username field in the drop down list box in the
orders_table.

Is it possible to create a query that will perform the
described functionality? If so, how can this be done?



 
Reply With Quote
 
 
 
 
John Vinson
Guest
Posts: n/a
 
      21st Oct 2003
On Tue, 21 Oct 2003 08:46:54 -0700, "Jeffrey Reed"
<(E-Mail Removed)> wrote:

>I have a two tables; users_table and orders_table.
>
>users_table has the following colums: userid, username.
>
>orders_table has the following colums: orderid, userid,
>username.


Why?

Storing the username redundantly in the Orders table wastes space and
gives you major headaches if a person changes their name. You'ld need
to track down every order they've made and update the name field.

Just store the UserID in the Orders table. If you need to see the
name, use a combo box bound to the UserID with the Name as the first
visible field (you don't usually need to see the ID on your forms at
all).


John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filling a textbox with a table's name field knowing the IDNum field John S. Ford, MD Microsoft Access Forms 3 9th Apr 2009 12:04 AM
Filling a textbox with a table's name field knowing the IDNum field John S. Ford, MD Microsoft Access Form Coding 3 9th Apr 2009 12:04 AM
Can I add 2 fields in 1 table and auto fill the answer in a third field? Jeff Microsoft Access 1 9th Mar 2007 09:09 PM
2 Related field or Auto fill up 2nd field after 1st field entered =?Utf-8?B?S2FvbGk=?= Microsoft Access Getting Started 1 17th Sep 2006 11:40 AM
Auto fill field in a table =?Utf-8?B?QnJlbnQ=?= Microsoft Access 2 12th Nov 2004 08:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:02 PM.