S
Slez via AccessMonster.com
I have a combo box on a main form called cboProjectName. It's source is a
table which contains the fields ProjectID and ProjectName (primary keys).
The main form stays open as it is sort of the databases "home page". Next to
cboProjectName is a command button which runs a macro: macFormAddNewProject.
It opens frmAddNewProject, goes to the new record, and resizes the form. On
this form is a control for the field ProjectName. When users need to add a
project into the database, they click the command button and type in the name
of a new project, then click "Accept" to do just that, or "Cancel", which
Undoes the new record. With all that said, I have 2 questions about things
I'd like frmAddNewProject to do.
1) After "Accept" is clicked, the record is added to the table, and
frmAddNewProject closes. On the main form, which as I mentioned remains open,
cboProjectName does not yet show that new record unless you close the main
form and re-open it. Is there a way to requery or refresh the records in
cboProjectName?
2) Because the field ProjectID exists, in theory, users could enter the same
exact name in the ProjectName field in frmAddNewProject and mistakenly create
a duplicate project. Is there a way to have this field autofill or something
that would alert users that they're in the process of entering a repeat or
similar name as a new record?
Thanks in advance for any feedback!
table which contains the fields ProjectID and ProjectName (primary keys).
The main form stays open as it is sort of the databases "home page". Next to
cboProjectName is a command button which runs a macro: macFormAddNewProject.
It opens frmAddNewProject, goes to the new record, and resizes the form. On
this form is a control for the field ProjectName. When users need to add a
project into the database, they click the command button and type in the name
of a new project, then click "Accept" to do just that, or "Cancel", which
Undoes the new record. With all that said, I have 2 questions about things
I'd like frmAddNewProject to do.
1) After "Accept" is clicked, the record is added to the table, and
frmAddNewProject closes. On the main form, which as I mentioned remains open,
cboProjectName does not yet show that new record unless you close the main
form and re-open it. Is there a way to requery or refresh the records in
cboProjectName?
2) Because the field ProjectID exists, in theory, users could enter the same
exact name in the ProjectName field in frmAddNewProject and mistakenly create
a duplicate project. Is there a way to have this field autofill or something
that would alert users that they're in the process of entering a repeat or
similar name as a new record?
Thanks in advance for any feedback!