D
DougW via AccessMonster.com
Good morning.
I continue to work on my first Access DB in many years, and am working my way
through many little issues. I hope one of you can help me with the latest
puzzle.
I have a form bound to a table. I use the form to add new records. I also
have included a query in a subform to display what has already been entered.
There are two list boxes on the form. The selections from these two list
boxes are bound to the fields in the table. The form is set with the
following properties:
Allow filters: Yes
Allow Edits: No
Allow Deletions: Yes
Allow Additions: Yes
Data Entry: Yes
Recordset Type: Dynaset
I have hidden the record selectors on the form. My intention is that the
form is intended for adding new records, and defaults to opening in the next
(new) record. I added an "add record" button to add the new record when the
user selects it. That seems to be working okay (changing "data entry" to
"yes" was necessary for it to work this way).
The query has criteria based on the selected fields in the open form.
I have created a macro to requery the control that contains the subform/query.
The macro is triggered by the "on click" event in either listbox.
As the user clicks around in the list boxes, the query in the subform
dynamically updates.
The query is showing the user records that have already been entered, that
use the values he has selected in the listbox. It's to give the user
awareness of what has already been entered, before he goes ahead and creates
what could be a redundant record. (In some cases a redundant record is okay,
so I can't use the "no duplicates" property in my table to prevent this case.)
Everything seems to be working fine, until the user goes ahead and adds a new
record.
After the new record has been added, and continuing to work in the same open
form, the query stops refreshing dynamically. It kind of "freezes".
The query will blank out when any other selection is made from the listbox.
If I reselect the choice from the listbox from the record I just added, that
query will re-display with the values from the record just added.
As a test, I opened the same query separately, in its own window. When I
have added a record from my form, and my subform query is "frozen", the
separate query will update to the current selected values from the form
listboxes (I do have to toggle the separate query to design view and back to
see the update).
Closing my form and re-opening will reset things so it behaves as I want.
However I would like to be able to continue working in the form after
multiple new records are added.
I hope that wasn't too rambling. Any ideas or tips on what I might be doing
wrong, or how I might get the form to behave as I would like? I would
appreciate any suggestions.
thanks,
Doug
I continue to work on my first Access DB in many years, and am working my way
through many little issues. I hope one of you can help me with the latest
puzzle.
I have a form bound to a table. I use the form to add new records. I also
have included a query in a subform to display what has already been entered.
There are two list boxes on the form. The selections from these two list
boxes are bound to the fields in the table. The form is set with the
following properties:
Allow filters: Yes
Allow Edits: No
Allow Deletions: Yes
Allow Additions: Yes
Data Entry: Yes
Recordset Type: Dynaset
I have hidden the record selectors on the form. My intention is that the
form is intended for adding new records, and defaults to opening in the next
(new) record. I added an "add record" button to add the new record when the
user selects it. That seems to be working okay (changing "data entry" to
"yes" was necessary for it to work this way).
The query has criteria based on the selected fields in the open form.
I have created a macro to requery the control that contains the subform/query.
The macro is triggered by the "on click" event in either listbox.
As the user clicks around in the list boxes, the query in the subform
dynamically updates.
The query is showing the user records that have already been entered, that
use the values he has selected in the listbox. It's to give the user
awareness of what has already been entered, before he goes ahead and creates
what could be a redundant record. (In some cases a redundant record is okay,
so I can't use the "no duplicates" property in my table to prevent this case.)
Everything seems to be working fine, until the user goes ahead and adds a new
record.
After the new record has been added, and continuing to work in the same open
form, the query stops refreshing dynamically. It kind of "freezes".
The query will blank out when any other selection is made from the listbox.
If I reselect the choice from the listbox from the record I just added, that
query will re-display with the values from the record just added.
As a test, I opened the same query separately, in its own window. When I
have added a record from my form, and my subform query is "frozen", the
separate query will update to the current selected values from the form
listboxes (I do have to toggle the separate query to design view and back to
see the update).
Closing my form and re-opening will reset things so it behaves as I want.
However I would like to be able to continue working in the form after
multiple new records are added.
I hope that wasn't too rambling. Any ideas or tips on what I might be doing
wrong, or how I might get the form to behave as I would like? I would
appreciate any suggestions.
thanks,
Doug