Title: Message
    You are most welcome  Tobi!
 
A.D.Tejpal
 
----- Original Message -----
Sent: Thursday, December 01, 2005 19:25
Subject: RE: [AccessDevelopers] Keeping subform updated

A.D.,
 
Thanks for your help.  While I sometimes have found the need to put the key field in an invisible textbox on a form, this is the first time I have seen the need to link a subform via the textbox name rather than the field name, and links to subforms usually don't require the field to be actually in a textbox on the subform, rather the need was in being able to refer to the key field in some other part of my code.
 
(And I figured there was probably a significant time difference between us, as well!)
 
Tobi
 
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of A.D.Tejpal
Sent: Thursday, December 01, 2005 12:44 AM
To: [email protected]
Subject: Re: [AccessDevelopers] Keeping subform updated

Tobi,
 
    When I uploaded the modified file, it was almost getting past midnight over here. My short post (just before I broke off for the day) was meant to enable you to try it out, till I could follow up with an explanation of the remedial measures that were applied.
 
    Yes, the fix had to do with proper linking of master & child fields. On Data tab of properties window for both your subform controls, OccurrenceID was indicated as the master as well as child field. However, no matching controls existed either on the parent form or on the subforms with this name.
 
    Remedial Action
    (a) Hidden control named OccurrenceID was freshly inserted in both the subforms.
    (b) Name of master field on Data tab of both the subform controls was changed to txtOccurrenceID so as to match the name of an existing control on the parent form. (ControlSource for this control is OccurrenceID).
 
    Note -
        For consistent results with linked subforms, the name of master field as mentioned on Data tab of properties window of subform control, should match that of an actually existing control on the parent form. Similarly, the name of child field should match that of an actually existing control on the subform.
 
Best wishes,
A.D.Tejpal
 
----- Original Message -----
Sent: Thursday, December 01, 2005 01:33
Subject: RE: [AccessDevelopers] Keeping subform updated

A.D.
 
It looks like the only change needed was to refer to the textbox name for the primary key on the main form, instead of the field name, and it works.  Is that what you did?  In all my years of Access development, I hadn't ever come across a problem solved this way, but it looks like the link to the subform couldn't be made to the actual field, since until you leave a record, it isn't actually saved, and therefore the link was actually still to the previous record.  Thanks, that's a direction I hadn't thought to look (just wish you'd mentioned how you made the fix)!
 
Tobi
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of A.D.Tejpal
Sent: Wednesday, November 30, 2005 12:59 PM
To: [email protected]
Subject: Re: [AccessDevelopers] Keeping subform updated

Tobi,
 
    Modified file named ListSelection_Fixed.zip has been uploaded to the files section. You might like to try it out and confirm whether the problem stands resolved.
 
Best wishes,
A.D.Tejpal
 
----- Original Message -----
Sent: Wednesday, November 30, 2005 20:11
Subject: RE: [AccessDevelopers] Keeping subform updated

Because I think this could be a useful routine for many of us, not just for me, once it works correctly, I've whittled my DB down and put it up in the Files/Need Help With section -- ListSelection.zip, in Access 2002.  The purpose of this database is to track errors in medication distribution to youth in detention centers, and I want all the selections in the list to be visible so the data entry person can easily select one or more choices from the list.  The form frmOccurrences has the steps to make the error happen.  Thanks all!
 
Tobi
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of brij
Sent: Wednesday, November 30, 2005 12:36 AM
To: [email protected]
Subject: Re: [AccessDevelopers] Keeping subform updated

Hi Tobi
 
i read the query about "Keeping subform updated" but didnt get it.
do u have MDB file and if it is possible please attach (zip file) it to
get the extact problem.
 
thanks
 
Brij here.
----- Original Message -----
Sent: Tuesday, November 29, 2005 10:38 PM
Subject: [AccessDevelopers] Keeping subform updated

I have a data entry form with a subform on a tab control - the fact that it's on a tab may be irrelevant, but maybe not …  Instead of having dropdowns for the entries in the subform, I have a list box outside the subform, and want any entry clicked in the listbox to go into the subform, which I do in code, in the listbox OnClick event.  (This is to prevent duplicate entries in the subform.)  This works beautifully for the first record entered, but on the second entry, the subform comes up with the previous entry's selection, although the correct data is saved.  Now if I switch tabs (here's where it becomes relevant!), and come back to the tab with the subform, the selection process works fine.  I've been trying to assure that the record is saved before entering the subform data, but sometimes come up against the "You can't save the data at this time" message.

When this works right, it's elegant, but when it doesn't, it is downright frustrating!

Tobi Hoffman
Dept. of Youth Services
Boston, MA




Please zip all files prior to uploading to Files section.




SPONSORED LINKS
Microsoft access developer Microsoft access help Microsoft access database
Microsoft access training Microsoft access training course Microsoft access programming


YAHOO! GROUPS LINKS




Reply via email to