Update a sub form from a pop up form

rhett7660

Still Learning....
Local time
Today, 15:57
Joined
Aug 25, 2005
Messages
371
Hope the title makes sense.

I have a form with a subform (frmEventSubForm). I have a control on the frmEventSubform (cmdAddEventType) that opens another form (frmEventType) so that the user can update the event type. The combo drop down I am trying to update is cboEventTypeVer2 on the sub form.

Hope that makes sense. I have tried:

Me.frmEventSubForm.Form.cboEventTypeVer2.Requery
Forms!frmEventSubForm.Form.cboEventTypeVer2.Requery

I can't get it to requery just the cboEventyTypeVer2 on the sub form.

Thanks
 
Forms!frmEventSubForm.Form!cboEventTypeVer2.Requery

???

I'm assuming you know that you have to reference the subform as it is named on the main form as a subform control and not the actual subform name -?

To keep these straight I always preface the control name with ctl. For example say my main form name is myMainForm and the sub form I have created is named mySubForm. In the main form I name the subform control ctlmySubForm. So a call to a control on the subform looks like this:

forms!myMainForm!ctlmySubForm.form!myComboBoxName

Not:

forms!myMainForm!mySubForm.form!myComboBoxName

Hope all of this makes sense...
 
Ken..

I have the following for the sub

Source Object: frmEventSubForm
Link Child Fields: EventID
Link Master Fields: EventID

The subform is in a tabbed environment. I forgot to mention that....

Thanks
 
I looked up the control, at least I am hoping I did..

tabctl26

I put that in the mysubform area and the code turns red... So I don't think I did it correctly.


forms!frmEventMainVer2!tabctl26.form!cboEventTypeVer2
'Me.frmEventSubForm.Form.cboEventTypeVer2.Requery
 
Yes it is still broken.

I have the subforms in a tabbed form.... I can't get the update form to requery the combo box...
 
I actually took that form out of the tabbed part and made it part of the regular form. So I think that is going to take care of my problem.
 

Users who are viewing this thread

Back
Top Bottom