Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2005
    Posts
    61

    Unanswered: Subform issue not recognizing value.

    Hello to all,

    Ok I have another problem. I have a sub form that I am copying data from and to the parent. All lines work except one. Here are two sets of my updates. They are both the same first one works and the second does not. I do not see anything wrong with what is below. In debug mode though OCP is empty though the field on the table has a value. it just does not see what is in the field for some reason.

    Now I did add this field afterward. could this have to do anything with it? Do I have to add this field anywhere else so that the for recognises it? It's in the table and every other field is seen just the new one that I added it doesn't recognise.

    Me.Parent.Claims_Actions_Taken_Text.SetFocus
    Me.Parent.Claims_Actions_Taken_Text.Locked = False
    Me.Parent.Claims_Actions_Taken_Text.Text = Actions_Taken
    Me.Parent.Claims_Actions_Taken_Text.Locked = True

    Me.Parent.Orig_Claim_Processor_Text.SetFocus
    Me.Parent.Orig_Claim_Processor_Text.Locked = False
    Me.Parent.Orig_Claim_Processor_Text.Text = OCP
    Me.Parent.Orig_Claim_Processor_Text.Locked = True

    Thanks for the help.

    Mythos

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Looks like the problem may be with the OCP variable. How are you setting the value? Is it possibly a different data type than the field?
    Inspiration Through Fermentation

  3. #3
    Join Date
    Apr 2005
    Posts
    61

    Not recognizing value in field

    I ended up adding the field to the sub form it then recognized the value. I then deleted the field and it continues to recognise the value. I guess this process added the field to the subform so that I can now reference that field on the table. I'm sure there is a more correct way to actually add the field I just don't know what that process is.

    Thank You

    Mythos
    Last edited by Mythos; 07-13-06 at 10:14.

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    small diversion: do your keyboard a favour.

    your four lines:
    Me.Parent.Claims_Actions_Taken_Text.SetFocus
    Me.Parent.Claims_Actions_Taken_Text.Locked = False
    Me.Parent.Claims_Actions_Taken_Text.Text = Actions_Taken
    Me.Parent.Claims_Actions_Taken_Text.Locked = True

    can be replaced with:
    Me.Parent.Claims_Actions_Taken_Text = Actions_Taken
    note the missing .Text - using the default .value property does not require focus (and code ignores .locked (and .enabled in case you are tempted!))

    .text .locked .setfocus have their uses - yours is not one of them.

    back to your question: what is this 'OCP' you are trying to talk to?
    the name of a field in the .recordsource of the subform?
    the name of a control on the subform?
    or?

    izy
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •