O
oldblindpew
This is the age-old problem of wanting to use the same form for
Add/Delete/Update/Browse. I'm using an autonumber surrogate key, but the
user identifies the record by FirmName and FirmCity. I use a dialog form
with a ListBox displaying FirmName and FirmCity to allow the user to find an
existing record for a particular Firm. The user cannot be allowed to edit
the FirmName field on this form because it is in effect a key value. If the
user does not find a record for the desired firm, he needs to be able to add
a new record, picking the FirmName from an existing list. I'm thinking of
adding a button to the form, labelled "Add New Record". On click, this would
open a dialog form with a List Box showing all the firms in alphabetical
order. The user would scroll down and select the desired Firm, and a new
empty record would be added for this firm. The user could then proceed with
filling out the form for the new record.
My questions are, First, is this good practice, or is there some better way.
Second, almost everything I've done so far has been with event procedures.
Should I try doing this with a macro? Third, if I use an event procedure,
what command would I use to add the new record?
I'm sorry to ask such basic questions. I have two thick books on Access and
I can't seem to find straightforward answers in either of them.
Thanks
Add/Delete/Update/Browse. I'm using an autonumber surrogate key, but the
user identifies the record by FirmName and FirmCity. I use a dialog form
with a ListBox displaying FirmName and FirmCity to allow the user to find an
existing record for a particular Firm. The user cannot be allowed to edit
the FirmName field on this form because it is in effect a key value. If the
user does not find a record for the desired firm, he needs to be able to add
a new record, picking the FirmName from an existing list. I'm thinking of
adding a button to the form, labelled "Add New Record". On click, this would
open a dialog form with a List Box showing all the firms in alphabetical
order. The user would scroll down and select the desired Firm, and a new
empty record would be added for this firm. The user could then proceed with
filling out the form for the new record.
My questions are, First, is this good practice, or is there some better way.
Second, almost everything I've done so far has been with event procedures.
Should I try doing this with a macro? Third, if I use an event procedure,
what command would I use to add the new record?
I'm sorry to ask such basic questions. I have two thick books on Access and
I can't seem to find straightforward answers in either of them.
Thanks