Hello all and Happy Holidays!
This is more a pet peeve of mine than a problem that does not have a workaround (or many).
The standard situation is this: main form – tab control with sub forms scenario. No creation of records / no deletion, just fields’ update available. After the user opens up the main form, he / she should choose the account to work with via a combo box. Naturally, the combo box’s after-update event starts the normal locate & show adequate record routine. All nice and dandy.
However, as you might guess, what happens is that when the main form is first opened it automatically shows the first record of the underlying data, which is not desired. The ideal would be to show nothing on the fields. One of the common tricks is to go to a new record (which obviously have empty fields), another is to hide the controls (visible = false) and show them up only after the combo box is updated, yet another is to use an unbound form.
All valid workarounds; however, I cannot invest the time to revamp the whole database to use unbound forms (my preferred solution), the hide-unhide trick is somewhat annoying, and I really, really dislike the false-new-record approach. Especially when, every time that happens, a primary key (autonum) is discarded, this generates wholes in the primary key sequence without a good explanation for it.
As I said, just a pet peeve, as those are all acceptable workarounds; however, I am still looking for that clean solution, a go-to-BOF-and-show-a-nice-set-of-empty-fields solution!
Suggestions?
Any help is always apreciated!
Thx,
4N6MSTR
______________________________________________
If you don't know where you are going
It does not matter how fast you are
You will never get there
This is more a pet peeve of mine than a problem that does not have a workaround (or many).
The standard situation is this: main form – tab control with sub forms scenario. No creation of records / no deletion, just fields’ update available. After the user opens up the main form, he / she should choose the account to work with via a combo box. Naturally, the combo box’s after-update event starts the normal locate & show adequate record routine. All nice and dandy.
However, as you might guess, what happens is that when the main form is first opened it automatically shows the first record of the underlying data, which is not desired. The ideal would be to show nothing on the fields. One of the common tricks is to go to a new record (which obviously have empty fields), another is to hide the controls (visible = false) and show them up only after the combo box is updated, yet another is to use an unbound form.
All valid workarounds; however, I cannot invest the time to revamp the whole database to use unbound forms (my preferred solution), the hide-unhide trick is somewhat annoying, and I really, really dislike the false-new-record approach. Especially when, every time that happens, a primary key (autonum) is discarded, this generates wholes in the primary key sequence without a good explanation for it.
As I said, just a pet peeve, as those are all acceptable workarounds; however, I am still looking for that clean solution, a go-to-BOF-and-show-a-nice-set-of-empty-fields solution!
Suggestions?
Any help is always apreciated!
Thx,
4N6MSTR
______________________________________________
If you don't know where you are going
It does not matter how fast you are
You will never get there