Pretty Access forms, like the tables -
08-08-2003
, 11:53 AM
I'm starting off Access with the classic 'Name and address' exercise.
The first field is 'Family name or organisation' because a person or
organisation has many data requirements that are the same - such as
address lines and telephone number.
But I know a lot of my friends through work, and it's useful to know
which organisation they work for, so I've:
(1) Created another column 'Organisation?' flagged Yes/No to show
which rows are organisations. This works.
(2) Create a query of the Organisations where the 'Organisation?' flag
is Yes. This works, giving a list of organisations.
(3) Used this in a list box in the 'Name and address' table to fill a
field containing the organisation that a friend works for. In the
table this list box works well.
(4) Now I want to repeat this in a form, preferably showing the
friend's organisation as the default, and I get the whole list with
the organisation highlighted if it's been selected. So far so good.
(5) What if someone doesn't work for an organisation? The table
supports a blank organisation well and it makes sense. The form won't
do it. It displays the organisation list with none of them
highlighted. Do I have to create a dummy organisation 'None' and put
these people into it? I'd like to write SQL or have a Visual Basic
procedure that returns a blank organisation when the table is blank.
Any ideas please?
Regards,
Nigel. |