M
my-wings
This is driving me nuts. Searching old posts and reading the Knowledge Base
Article - 279028 which I found cited (url below) just hasn't helped.
http://support.microsoft.com/defaul...port/kb/articles/q279/0/28.asp&NoWebContent=1
I am running Microsoft Access 2000 (9.0.2720)
I have a form frmBookList which includes a subform,
jcnCollectionsInBooksSubform. The subform has a field CollectionsID, which
is a dropdown list bound to a junction table, jcnCollectionsBooks. (I'm not
sure if that last is important, but thought I'd just toss it in.)
For most other dropdown lists bound to tables, I use a very simple system to
add new entries to the table and have them immediately available in the
dropdown list. The top entry in the table will be "[add new]", and I use an
AfterUpdate event macro to test if the field reads "[add new]". If it does,
I open a form to add the entry to the table. This form just gets closed in
the normal way, and I have another macro attached to the On GotFocus event
of the field I want updated which is nothing but the single action Requery
with the field name specified.
When I try the same thing in my subform, the above sequence of events nets
me the error message mentioned in the Knowledge Base article.
I have tried the fixes given in the Knowledge Base article, but neither
seems to work. The "RunCommand" / Run thing just makes no sense whatsoever
to me, even though I tried it. All that happened was that my screen would
flicker for several seconds when I first entered the field, and then nothing
after I closed the form after adding a new collection.
Then I tried doing the Visual Basic solution and putting my form and field
names into that, it was essentially the same response.
I think the problem may by that I'm trying to use the "On GotFocus" event as
the trigger for this Requery action. Even though my curser is clearly IN
that field after I close the update form, for some reason, this is not being
interpreted as "On GotFocus" in the subform. I am reluctant to attach a
macro to the closing of the update form, because it may not always be called
when frmBookList is open.
I would appreciate any help or suggestions anyone is willing to offer. If
the solution involves Visual Basic, I would be forever grateful if it could
be made childishly clear, as I know almost nothing about Visual Basic. All
of my solutions so far have been macros.
Thanks.
Alice
Article - 279028 which I found cited (url below) just hasn't helped.
http://support.microsoft.com/defaul...port/kb/articles/q279/0/28.asp&NoWebContent=1
I am running Microsoft Access 2000 (9.0.2720)
I have a form frmBookList which includes a subform,
jcnCollectionsInBooksSubform. The subform has a field CollectionsID, which
is a dropdown list bound to a junction table, jcnCollectionsBooks. (I'm not
sure if that last is important, but thought I'd just toss it in.)
For most other dropdown lists bound to tables, I use a very simple system to
add new entries to the table and have them immediately available in the
dropdown list. The top entry in the table will be "[add new]", and I use an
AfterUpdate event macro to test if the field reads "[add new]". If it does,
I open a form to add the entry to the table. This form just gets closed in
the normal way, and I have another macro attached to the On GotFocus event
of the field I want updated which is nothing but the single action Requery
with the field name specified.
When I try the same thing in my subform, the above sequence of events nets
me the error message mentioned in the Knowledge Base article.
I have tried the fixes given in the Knowledge Base article, but neither
seems to work. The "RunCommand" / Run thing just makes no sense whatsoever
to me, even though I tried it. All that happened was that my screen would
flicker for several seconds when I first entered the field, and then nothing
after I closed the form after adding a new collection.
Then I tried doing the Visual Basic solution and putting my form and field
names into that, it was essentially the same response.
I think the problem may by that I'm trying to use the "On GotFocus" event as
the trigger for this Requery action. Even though my curser is clearly IN
that field after I close the update form, for some reason, this is not being
interpreted as "On GotFocus" in the subform. I am reluctant to attach a
macro to the closing of the update form, because it may not always be called
when frmBookList is open.
I would appreciate any help or suggestions anyone is willing to offer. If
the solution involves Visual Basic, I would be forever grateful if it could
be made childishly clear, as I know almost nothing about Visual Basic. All
of my solutions so far have been macros.
Thanks.
Alice