Here is my attempt in relation to being on the current main form
Me!PlacementsSubform.Form!MonitoringSubform.Form!Con_ID.RowSource =
"..."
Also I attempted to reference it explicitly
Forms!frm_Positions!PlacementsSubform.Form!MonitoringSubform.Form!
Con_ID.RowSource = "..."
I got my syntax from the Access Web - http://www.mvps.org/access/forms/frm0031.htm.
I am referencing the subform's CONTROL name and not their Source
Objects. The control Con_ID is the correct name and it is a combo
box.
Your help is appreciated
Tony
That syntax looks right to me. Am I right in understanding that the
subforms are nested, so that MonitoringSubform is a subform control on the
form represented by PlacementsSubform, which is a subform control on the
main form, which is the form that is executing the code? "frm_Positions" is
the name of that main form?
Try this as a debugging procedure in the Immediate window:
DoCmd.OpenForm "frm_Positions"
?Forms!frm_Positions!PlacementsSubform.SourceObject
(should display the name of the form represented by
PlacementsSubform)
?Forms!frm_Positions!PlacementsSubform.Form!MonitoringSubform.SourceObject
(should display the name of the form represented by
MonitoringSubform)
?Forms!frm_Positions!PlacementsSubform.Form!MonitoringSubform.Form!Con_ID
(should display the current value of Con_ID -- maybe Null)
If any of those statements gives an error, that should point to where the
problem lies. If none of them gives an error, then either the main form's
Open event is too soon for some reason, or maybe you are doing something
like assigning a subform's SourceObject in the Open, Load, or Currrent event
of its parent. Only you can say if you're doing that.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Tony
On Jul 17, 11:50 am, "Dirk Goldgar"
> (please reply to the newsgroup)- Hide quoted text -
>
> - Show quoted text -
I checked the control and Con_ID is in fact its name and the name of
the field it is bound to. I checked the underlying SQl to make sure it
is pulling the correct field and it is. It is a combo box and I set
the column width to show the first column so I can confirm it is
displaying data. I just can't set the reference it in any way.
I tried changing the control name thinking that it was conflicting
with the field name but that made no difference (I didn't expect it
to)
I can find no other code attempting call or modify that control in any
way pon open, load, current or any other event.
I checked that I don't have any missing references.
ARRGH! Access gods, what am I doing wrong!
[heavy sigh]
I do vaguely remember a similar problem I had a long time ago in a
version 2000 database where I had to set focus on controls 'down the
ladder' so to speak - to get access to be able to reference a control
in subform 2. I don't know if that is what is going on here and I
don't remember if I had to setfocus on the subform controls themselves
or control on the subforms or some combination. If that rings a bell
to you maybe you know the correct syntax to get that done.
Unfortunately I don't have that database areound anymore to reference
it.
Thanks for your help so far. Any other suggestions?
Tony
On Jul 17, 11:50 am, "Dirk Goldgar"
<d...@NOdataSPAMgnostics.com.invalid> wrote:
Me.Text4 = Me.OrdersSubform.SourceObject
Me.Text6 = Me!OrdersSubform.Form!OrderType
Me.Text8 = Me!OrdersSubform.Form!OrdersDetailsSubform.SourceObject
Me.Text10 = Me!OrdersSubform.Form!
OrdersDetailsSubform.Form.RecordSource
Me.Text12 = Me!OrdersSubform.Form!OrdersDetailsSubform.Form!
ProductNumber
Me.Text14 = Me!OrdersSubform.Form!OrdersDetailsSubform.Form!
ProductNumber.RowSource
For the offending database I imported all objects into a new MDB
thinking there was some corruption. No go.
I am sick of beating my head against a wall so for now I will set the
JobID to a public variable, set the timer interval on subform2 to 1
second and on the first timer event if the control's rowsource is
blank then set it referring to the public varable in the SQL criteria.
I tested and so far that works.
Thanks
Tony
On Jul 20, 4:44 pm, tonyv <t...@stamperssidekick.com> wrote:
<refer to previous posts>
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
"tonyv" wrote in message
news:07d3a712-b0df-488e...@b15g2000yqd.googlegroups.com...
Tony
On Jul 22, 8:38 am, "Dirk Goldgar"