Calculated Field Not Requerying

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark Kola

    Calculated Field Not Requerying

    I have ran into an interesting situation. I have a calculated field
    based on a combobox column that somtimes is not requerying when I
    change the combo box value.

    Combobox
    cboCustomer
    2 Columne - Widths 1;0 - LimitToList = Yes

    Calculated TextBox -
    ControlSource =cboCustomer.Co lumn(1)

    These controls are set in a Tab Control with one page that has the
    following properties
    It is transparent and has no buttons or Tabs

    Any help to why it only requeries sometimes would be very appreciated

    Mark Kola
  • Ray

    #2
    Re: Calculated Field Not Requerying

    mwkola@hotmail. com (Mark Kola) wrote in message news:<9be2d9da. 0404142050.a6f9 140@posting.goo gle.com>...[color=blue]
    > I have ran into an interesting situation. I have a calculated field
    > based on a combobox column that somtimes is not requerying when I
    > change the combo box value.
    >
    > Combobox
    > cboCustomer
    > 2 Columne - Widths 1;0 - LimitToList = Yes
    >
    > Calculated TextBox -
    > ControlSource =cboCustomer.Co lumn(1)
    >
    > These controls are set in a Tab Control with one page that has the
    > following properties
    > It is transparent and has no buttons or Tabs
    >
    > Any help to why it only requeries sometimes would be very appreciated
    >
    > Mark Kola[/color]

    Hello Mark,

    It seems to me that what you have set up is the Text box
    sourcing column(1) from the combo box when the form opens
    but nothing to update the text box after a new selection
    has been made in the combo box.

    I think that what should be done is to requery the record
    so that your calculated text box data can be updated.

    Add the following code to the "After Update" property of
    your combo box:

    DoCmd.Requery

    If that doesn't work, try:

    CalculatedTextB ox.value = cboCustomer.Col umn(1)

    Regards,

    Ray

    Comment

    • Mark Kola

      #3
      Re: Calculated Field Not Requerying

      I Think I figured out the answer.

      I also had the detail section hidden when the form opened up. It looks
      as if when that section is hidden, there is an issue with form
      calculations. I don't know what the issue is but corrected the problem
      by doing the following:

      1. Reset Form Detail section to visible
      2. On form load set focus to a detail control and then to the header
      control and set the form detail to not visible

      Mark


      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...