Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / October 2005

Tip: Looking for answers? Try searching our database.

populating option box with correct options

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tcorlew - 27 Oct 2005 16:11 GMT
I have seen this asked before and printed the answer but I lost the sheet and
can't find it again, so sorry about the duplicate question.

I have a form called customers that has a subform called salespersons.  I am
trying to make a job form and what I want is when you choose the customer the
combo box displays only the salepersons for that customer.

Do I need a field in the jobs table called Salesperson and then write and
SQL statement or should I link it another way?
Klatuu - 27 Oct 2005 19:57 GMT
If you want to display only one value, then a combo box is the wrong control
to use.  A text box would be more appropriate.  How to get the correct value
into the control will depend on how your data is organized.

> I have seen this asked before and printed the answer but I lost the sheet and
> can't find it again, so sorry about the duplicate question.
[quoted text clipped - 5 lines]
> Do I need a field in the jobs table called Salesperson and then write and
> SQL statement or should I link it another way?
tcorlew - 27 Oct 2005 20:10 GMT
Currently I am set up with a customers table and then a salespersons table.  
Then I have a form called customers that has a subform called salesperson.  I
had to use a subform because there is more than one salesperson per customer.

Now I need to create a jobs form.  When I select a customer I want it to
bring up all the salespersons for that customer in a combo box and the person
keying in the job will select which salesperson is responsible for that job.

The reason for this is because when I print any kind of paper work for the
job I need it to reference the correct salesperson.

hope this makes sense

> If you want to display only one value, then a combo box is the wrong control
> to use.  A text box would be more appropriate.  How to get the correct value
[quoted text clipped - 9 lines]
> > Do I need a field in the jobs table called Salesperson and then write and
> > SQL statement or should I link it another way?
John Vinson - 27 Oct 2005 20:01 GMT
>I have seen this asked before and printed the answer but I lost the sheet and
>can't find it again, so sorry about the duplicate question.
[quoted text clipped - 5 lines]
>Do I need a field in the jobs table called Salesperson and then write and
>SQL statement or should I link it another way?

How do you record which salesperson as associated with which customer?
Having a Subform doesn't do so - the subform on the Customers form
could contain any number of salespeople.

What are the relationships between Customers, Jobs, and salespeople?

                 John W. Vinson[MVP]    
tcorlew - 27 Oct 2005 20:21 GMT
I have a direct relationship between customers and salesperson

My customers form has tabs at the top

"Customer Info"   "Billing Info"  "Shipping Info"   "Sales Persons"

on each tab there is a customer ID that connects them all so they all update
together.  So when I key in a customer and then key in the sales people
(there are often more than one) the next time I look it up it only shows the
salesperson for that customer.

The subform I have in the customers form is a continous form that allows me
to key in more than one at a time or go back and add more.

> >I have seen this asked before and printed the answer but I lost the sheet and
> >can't find it again, so sorry about the duplicate question.
[quoted text clipped - 13 lines]
>
>                   John W. Vinson[MVP]    
John Vinson - 29 Oct 2005 06:49 GMT
>I have a direct relationship between customers and salesperson
>
[quoted text clipped - 9 lines]
>The subform I have in the customers form is a continous form that allows me
>to key in more than one at a time or go back and add more.

You're describing your Form.

Data is not stored in Forms. It's stored in Tables.

What are your Tables? What is each Table's Primary Key? How (if at
all) are the tables related in the Relationships window?

                 John W. Vinson[MVP]    
tcorlew - 31 Oct 2005 21:30 GMT
Here's what my tables look like:

Customers
  CustomerID  -----primary key
  CompanyName
  CompanyAddress
  etc......

Salespersons
  SalespersName-----primary key
  CustomerID
  etc.....

In the relationship table they are connected by the CustomerID

Hope this will make sense to you, if not I give up.

> >I have a direct relationship between customers and salesperson
> >
[quoted text clipped - 18 lines]
>
>                   John W. Vinson[MVP]    
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.