Form Design

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have three tables:
1. Clients
2. ServiceTickets (The same as an orders table)
3. Services (The same as a products table)

I need to create a form or subform where the user can select wich service to pick from (supposedly from the services table) and have the different fields corresponding to the particular service fill in automatically.
Sort like when selecting a product from an inventory into an invoice form and having the price, description and discount fill in in the next fields.

I keep reading the book and try to reverse engineer the Northwind Database shipped with MS Access but every thing gets confused.

I think it can be done with a look up field but I keep reading about disasters that can be unravelled if I use such a field, nevermind the fact that I have not gotten it to work anyways, save for getting to show only one column.

Can some one please tell me if this can be done without look up field, or if it can without much problems later on for me (because of user input through the look up field) and show me the specific steps.

I would greatly appreciate this and I will pass along to others when I see that I can help.

Bikerman
 
Bikerman

Generically, ...

on a form, add a combo box control. For a row source, use a query that
returns all the fields you'd like to see (services info). Bind this control
to the ServiceTickets field that holds "service" ID (a foreign key).

On your form, add a few additional text box controls, not bound to fields.

In the AfterUpdate event of the combo box, you will be "setting" the values
of those unbound controls, with something like:

Me!MyFirstTextControl = Me!cboMyComboBox.Column(1)
Me!MySecondTextControl = Me!cboMyComboBox.Column(2)
...

NOTE: the .Column(n) method is zero-based -- if the value you wish to show
in the first text control is in the 5th physical column of your query, you'd
use .Column(4) to point to it.

--
Good luck

Jeff Boyce
<Access MVP>

(I always found the speed exhilarating, and the sudden stops disconcerting!)
 
Back
Top