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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

I'm a noooby



 
 
Thread Tools Display Modes
  #1  
Old April 16th, 2005, 06:18 AM
cakewalkr7
external usenet poster
 
Posts: n/a
Default I'm a noooby

I have 2 tables in access and I need to have a form that adds a record
to one table. With the auto form feature, it seems easy enough.
However, I need to get to have a drop down / combo box on the form
that lists all the company names with the ID from the 2nd table. So,
when someone fills in the form for the orders table, they have to
select a company from the companies table to assign the order to. Is
there an easy way to do this? Thanks.

  #2  
Old April 16th, 2005, 06:38 AM
Dirk Goldgar
external usenet poster
 
Posts: n/a
Default

"cakewalkr7" wrote in
message
I have 2 tables in access and I need to have a form that adds a record
to one table. With the auto form feature, it seems easy enough.
However, I need to get to have a drop down / combo box on the form
that lists all the company names with the ID from the 2nd table. So,
when someone fills in the form for the orders table, they have to
select a company from the companies table to assign the order to. Is
there an easy way to do this? Thanks.


Sure. Create the first form. I'll assume that the form is not
automatically created with a combo box to represent the CompanyID field.
So, with that form open in design view, delete the text box that was put
there for CompanyID. Make sure sure that the control wizards are turned
on -- the little "magic wand" button near the top of the toolbox should
be "pushed in" -- click the combo box tool from the tool box and then
click the place on your form where you want the combo box to go. No
need to be too precise about this, you can (and probably will) fix up
the size and position later.

The combo box wizard will start and take you through the steps to create
the combo box. You should tell it "I want the combo box to look up
values in a table or query", then tell it which table you want it to get
them from (your second table), then choose both the company name and the
company ID fields. Let it hide the ID column, and tell it to store the
value in the the appropriate field in your first table (the form's
record source).

Tell the wizard how you want the combo box to be labelled, and Bob is,
if not your uncle, at least a very near relative.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 




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 02:04 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.