COMBOBOX REFRESH DILEMMA
' I have been working for hours trying to figure out how to requery a
combobox in a subform, from a Popup form
' that this subform had launched. Basically, I designed a form that
pops up when the user dbl-clicks a combobox.
' This popup form displays the table that the combobox uses. The user
can change the content, and the combobox
' rowsource in-turn will change. This all works great in my mainform,
but not in a subform located on the main form.
' In a previous post, I was given some suggestions but could not
understand or get any of them to work, and was hoping
' for more advice, as I'm going crazy with this!!!
' ************************************************** **
' Mainform is [F-PERS], SubForm is [F-CRED], SubForm Control is [F-
CREDsub]
' The SubForm is located on a Tab of the MainForm and gets its
RecordSource in code when tabbed.
' My SubForm has 5-ComboBoxes, one of which is called cboStatus
' My PopUp Form is [FL-FIELDEDIT2] and is PopUp=Yes, Modal=Yes
' My Table for cboStatus is [T-STATUS] and the PopupForm uses this
Table for combo rowsource changes.
' The following code launches the popup form, from my SubForm :
' This popup I use for any combobox rowsource data change.
'----------------------------------------------------------------------
DoCmd.OpenForm "FL-FIELDEDIT2", acNormal, , , acFormEdit 'How I
call the PopUp
'I pass values to the Popup at this point, and this works OK.
[Forms]("FL-FIELDEDIT2").RecordSource = strTable
[Forms]("FL-FIELDEDIT2").lblSubject.Caption = strTitle
[Forms]("FL-FIELDEDIT2").txtDmyFormName = strFormName
[Forms]("FL-FIELDEDIT2").txtDmyCtrlName = strCtrlName
'----------------------------------------------------------------------
' Everything in the PopUp Form works great, I can change any
comboboxes rowsource from any form and for
' any combocontrol. BUT, I cannot Requery the combobox that launched
the PopUp Form!
' I cannot use the exit event of the combobox to requery (this is too
soon), and I cannot refer to the subform from
' the PopUp Form. Also, the SubForms AfterUpdate event is no good
because I'm still on the same record when
' the PopUp ends. The ComboBox needs to Refresh right after the PopUp
form exits.
' I'm so close except for this issue! Maybe My Approach Is
Wrong???
Thanks For The Patience
Greg