B
BruceM
I have been wrestling for a while with a problem, and finally have to admit
that I cannot find a solution (assuming there is one). In a vendor database
I have decided to put phone numbers into their own table rather than having
Phone1, Phone2, etc. fields. I have made a phone table (tblPhone), linked
to the main (Vendor) table. Then on the main (Vendor Information) form I
have added a Phone subform. I have used the subform's Current event to show
the subform's vertical scroll bar if there is more than one phone number;
otherwise there is no scroll bar. The Phone text box on the subform and the
subform control itself are the same size as text boxes on the main form, for
a clean look.
The trouble is that if there are two or more phone numbers (and the
subform's scroll bar appears), the user can scroll down to the new record.
I can eliminate that by setting AllowAdditions to No, but then of course I
can't add a record (from time to time a number will be needed). I can put a
command button in the subform to set AllowAdditions to Yes and to go to a
new record, but if I add the command button to the right of the text box
then the scroll bar gets pushed to the right of the command button. I would
need to redesign my form to put the command button elsewhere. In any case I
should have the option of putting it where I would like it to be.
So I tried adding a command button to the main form, but I can't find a way
to move to a new subform record from there. The only way I can find to move
to a new subform record is first to go to the subform, then navigate from
there.
This (and other databases where I work) are for the most part used only
occasionally. The interface needs to be self-explanatory. I can retrain
people, but I really can't expect them to remember several weeks or months
later.
Here's what I need:
1) A phone number listing (related table and subform) to accomodate several
numbers for each vendor
2) A scroll bar on the subform only if there is more than one phone number;
otherwise no scroll bar
3) When there is a scroll bar, the default should be that there is no new
blank record at the end of the subform
4) A way to add phone numbers (by going to a new subform record)
If there is another way to accomplish this I am open to suggestion.
By the way, I know that data are stored in tables, not in forms and
subforms. It is often convenient to refer to the subform rather than to the
subform's record source. Perhaps I'm being lazy, but there it is.
that I cannot find a solution (assuming there is one). In a vendor database
I have decided to put phone numbers into their own table rather than having
Phone1, Phone2, etc. fields. I have made a phone table (tblPhone), linked
to the main (Vendor) table. Then on the main (Vendor Information) form I
have added a Phone subform. I have used the subform's Current event to show
the subform's vertical scroll bar if there is more than one phone number;
otherwise there is no scroll bar. The Phone text box on the subform and the
subform control itself are the same size as text boxes on the main form, for
a clean look.
The trouble is that if there are two or more phone numbers (and the
subform's scroll bar appears), the user can scroll down to the new record.
I can eliminate that by setting AllowAdditions to No, but then of course I
can't add a record (from time to time a number will be needed). I can put a
command button in the subform to set AllowAdditions to Yes and to go to a
new record, but if I add the command button to the right of the text box
then the scroll bar gets pushed to the right of the command button. I would
need to redesign my form to put the command button elsewhere. In any case I
should have the option of putting it where I would like it to be.
So I tried adding a command button to the main form, but I can't find a way
to move to a new subform record from there. The only way I can find to move
to a new subform record is first to go to the subform, then navigate from
there.
This (and other databases where I work) are for the most part used only
occasionally. The interface needs to be self-explanatory. I can retrain
people, but I really can't expect them to remember several weeks or months
later.
Here's what I need:
1) A phone number listing (related table and subform) to accomodate several
numbers for each vendor
2) A scroll bar on the subform only if there is more than one phone number;
otherwise no scroll bar
3) When there is a scroll bar, the default should be that there is no new
blank record at the end of the subform
4) A way to add phone numbers (by going to a new subform record)
If there is another way to accomplish this I am open to suggestion.
By the way, I know that data are stored in tables, not in forms and
subforms. It is often convenient to refer to the subform rather than to the
subform's record source. Perhaps I'm being lazy, but there it is.