Switchboard with SQL?

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

Guest

On my switchboard I have a page pointing to several telephone forms. All the
forms are in fact the same, however the sql statement per form is different
as they are devided between type of contact like customer, supplier and so on.
I do have a form called overviewTelephoneList with a sql statement so I can
do with only one form for all kind of contact types.
How can I do the same within a switchboard?

Greetings,
Harry
 
Harry, the best solution would be to combine all those tables into one.

If any contact can be only one kind of entity (e.g. a supplier can never be
a customer as well), the combined table will have a new field to indicate
the customer type. If necessary, you can still get exactly the same
situation as your separate tables, just by creating different queries that
fetch the appropriate type.

That solves the whole situation, and is often useful. If you need to connect
up people at companies, you can take this idea even further, as suggested
here:
People in households and companies - modelling human relationships
at:
http://allenbrowne.com/AppHuman.html

If there is some special reason why you cannot do that, you already have a
(UNION?) query feeding your overviewTelephoneList, so your switchboard could
OpenForm on that.
 
Hi Allen,

I already combined all within one single table. The table consists fe
"ContactID,Companyname,ContactTypeID, and so on".
Using a continous form to display CompanyName,Telephone,Mobile,PersonName I
create an overview.
As I want to make seperate overviews by ContactTypeID so I can do with
one(1) form for all types of contact.
Heaving a form viewTelephone with buttons I have assigned to each button a
Tag. Using this Tag within a select statement I open the form
TelephoneNumbers by use of this SQL Statement.
The form viewTelephone is called from a main Contacts-form and by clicking
the requested overview a telephone list is created.
However within my main menu (=switchboard) I have defined a listing of
different telephone overviews.
Now I want to make the switchboard to react as the form viewTelephone so I
can reduces the quantity of forms needed. Get back from 10 to 1.

Greetings
Harry

PS: The link you've provided shows a very clear overview. My compliments
 
Could you use the WhereCondition of OpenForm so that you open the form
filtered to only one type of client?

For example, if Supplier is ContactTypeID 7, you would use:
DoCmd.OpenForm "viewTelephone", WhereCondition:="ContactTypeID = 7"
 
Back
Top