Updating subforms

Are you trying to update a particular field in the main form ? Could you not take just the combo-box and place it on the main form, and use the selected item to update? OASys1 Yes, I am just trying to update two particular fields. OASys1" id="ctl00_m_m_i_ctl00_gr_ctl15_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="4733409" / Control Source: [Course_No] Row Source: SELECT [COURSE_ID], [COURSE NUMBER], [COURSE TITLE] FROM tbl Training Course ORDER BY [COURSE TITLE]; This works fine for now, but I know I need to do some more work since the Training Source can have multiple values, which means that I have some more tweaking to do with some of the other textboxes. It got me thinking." id="ctl00_m_m_i_ctl00_gr_ctl17_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="4748159" / Bruce, sorry for the delay in getting back to you. Anyway, after taking another look at what I was trying to do, I decided I was making things way too difficult and put the combo box on the main form and did away with the subform. Yeah, thought maybe you took a trip to the beach..<lol>..Are you trying to update a particular field in the main form ? I decided to put the combo box on the main form and change the record source of the combo box to the table versus a query, and put the code in the after update event of the combo box, but still no joy. This formats the code block in a way that will keep the indents, formatting, etc from being lost when you submit your reply. Control Source: [Course_No] Row Source: SELECT [COURSE_ID], [COURSE NUMBER], [COURSE TITLE] FROM tbl Training Course ORDER BY [COURSE TITLE]; This works fine for now, but I know I need to do some more work since the Training Source can have multiple values, which means that I have some more tweaking to do with some of the other textboxes. (although I do not know if you live near one..) Anyhow...If the Limit To List property of the combo box is set to Yes, the Error event for the form occurs immediately after the Not In List event: Key Down Key Press Dirty Change Key Up Not In List Error Top of Page When you move the focus to an existing record on a form, enter or change data in the record, and then move the focus to another record, the following sequence of events occurs for the form: Current (form) Before Update (form) After Update (form) Current (form) When you leave the record whose data has changed, but before you enter the next record, the Exit and Lost Focus events occur for the control that has the focus.

This event occurs whenever the contents of the control change, but before you move the focus to a different control or record (and therefore, before the Before Update and After Update events occur).

Do post back because not only myself, but other fine people here at ITToolbox can be of resistance..

Do remember the formatting tips I gave in a previous post to help the code be more readable..

OASys1 on the main form, and let the normal processes that save changes to the bound fields update the table. Meyers-Jouan" id="ctl00_m_m_i_ctl00_gr_ctl03_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="4731830" / You may wish to try this.

The training requirements provided related to a course in an existing table, but the new table does not have the related course no or control number associated with the training requirement.

updating subforms-89updating subforms-81updating subforms-29

I have tried numerous ways to get this to work without success; even moving the command button control from the main form to the subform (which is where the command button currently resides). Open Recordset("tbl Training Rqmts", db Open Dynaset) With rs . Open Recordset("tbl Training Rqmts", db Open Dynaset) With rs . I am trying to select the correct course from the combo box on the subform and then update the main form with the value selected from the combo box on the subform.

Join our conversation (46 Comments).
Click Here To Leave Your Comment Updating subforms.

Comments:

Leave a Reply

Your email address will not be published. Required fields are marked *