Continuous Form - Populate unbounded field

  • Thread starter Thread starter cp2599
  • Start date Start date
C

cp2599

All records are populated rather than just the selected record.
I have a continuous form with a combo box that populates a hidden
field. I've added an unbounded text box to display the name
associated to the hidden field. However, although the value in the
hidden field and combo box only appears on the selected record, the
unbounded textbox gets populated on all records rather than just the
one with the value. Here's the code ... was added in the After Update
on the combo box. Please help me contain the dlookup value to the
selected record. Thank you.

If Nz(Me.cboProxyName, 0) = 0 Then
Me.txtProxyName = Null
Me.lngzProxyNameID = Null
Else
If Me.lngzProxyNameID > 0 Then
Me.txtProxyName = DLookup ....
End If
End If
 
All records are populated rather than just the selected record.
I have a continuous form with a combo box that populates a hidden
field.  I've added an unbounded text box to display the name
associated to the hidden field.  However, although the value in the
hidden field and combo box only appears on the selected record, the
unbounded textbox gets populated on all records rather than just the
one with the value.  Here's the code ... was added in the After Update
on the combo box.  Please help me contain the dlookup value to the
selected record.  Thank you.

    If Nz(Me.cboProxyName, 0) = 0 Then
        Me.txtProxyName = Null
        Me.lngzProxyNameID = Null
    Else
        If Me.lngzProxyNameID > 0 Then
            Me.txtProxyName = DLookup ....
        End If
    End If

Two things ... I found a previous post that hinted unbounded fields
and continuous forms don't mix since there is no place to store that
data - suggestion was to add a dummy field. I also discovered that I
don't need the extra field ... the name displaying in the dropdown
will automatically appear based on the hidden value that was saved.

Sorry for posting too soon.
 
Back
Top