Control Source and Tables Not Talking

  • Thread starter zat via AccessMonster.com
  • Start date
Z

zat via AccessMonster.com

Reading through the postings I realize, to update a table, the control source
in a form has to have the field's name. I have two fields in my form (Org &
Poc) and when a user selects from the Org field the Poc auto populates. I've
accomplished this with =[org].column(2) in the Control Source of POC, which
does not post the Poc entries to the table. The other issue contains three
fields: Reply, Num and Status. If Reply is checked Status=Open. If Reply is
not checked Status=Not Required. If Reply is check and Num has a value, then
Status=Closed. I've accomplished this by putting =IIf([ysnReplyFlag]=No,"Not
Required ",IIf([ysnReplyFlag]=Yes And [strCrossRef] Is Null,"Open","Closed"))
in the Control Source of the Status field. So since this isn't updating my
tables, what is the correct way of accomplishing these tasks? Thanks so much!
 
G

Guest

The first one.
Bind the Poc control to the Poc field in the record source.
In the After Update event of org:
Me.Poc = Me.org.column(2)


:

Second one
In the after update of Reply
If Me.Reply = True Then
If Not IsNull(Me.Num) Then
Me.Status = "Closed"
Else
Me.Status = "Open"
End If
Else
Me.Status = "Not Required"
End If

Me.Status = IIf(Me.Reply, "Open", "Not Required")
 
Z

zat via AccessMonster.com

Okay, to tackle the first issue: The control source for POC now has the
field POC. I have an event procedure on Org for After Update that reads: Me.
POC = Me.Org.Column(2). I get an error on this. The value for POC = 1 and
the value for Org.Column(2) = Sharon, which is the correct value that should
post to POC.
The first one.
Bind the Poc control to the Poc field in the record source.
In the After Update event of org:
Me.Poc = Me.org.column(2)

Second one
In the after update of Reply
If Me.Reply = True Then
If Not IsNull(Me.Num) Then
Me.Status = "Closed"
Else
Me.Status = "Open"
End If
Else
Me.Status = "Not Required"
End If

Me.Status = IIf(Me.Reply, "Open", "Not Required")
Reading through the postings I realize, to update a table, the control source
in a form has to have the field's name. I have two fields in my form (Org &
[quoted text clipped - 7 lines]
in the Control Source of the Status field. So since this isn't updating my
tables, what is the correct way of accomplishing these tasks? Thanks so much!
 
G

Guest

What error are you getting?

zat via AccessMonster.com said:
Okay, to tackle the first issue: The control source for POC now has the
field POC. I have an event procedure on Org for After Update that reads: Me.
POC = Me.Org.Column(2). I get an error on this. The value for POC = 1 and
the value for Org.Column(2) = Sharon, which is the correct value that should
post to POC.
The first one.
Bind the Poc control to the Poc field in the record source.
In the After Update event of org:
Me.Poc = Me.org.column(2)

Second one
In the after update of Reply
If Me.Reply = True Then
If Not IsNull(Me.Num) Then
Me.Status = "Closed"
Else
Me.Status = "Open"
End If
Else
Me.Status = "Not Required"
End If

Me.Status = IIf(Me.Reply, "Open", "Not Required")
Reading through the postings I realize, to update a table, the control source
in a form has to have the field's name. I have two fields in my form (Org &
[quoted text clipped - 7 lines]
in the Control Source of the Status field. So since this isn't updating my
tables, what is the correct way of accomplishing these tasks? Thanks so much!
 
Z

zat via AccessMonster.com

Thanks for your help Kluauu; this forum is a true lifesaver! I finally
figured out my problem; I was not consistent in naming my POC field: some
were ingPOC and some were strPOC - duh!
What error are you getting?
Okay, to tackle the first issue: The control source for POC now has the
field POC. I have an event procedure on Org for After Update that reads: Me.
[quoted text clipped - 26 lines]
 
G

Guest

That duhPOC will get you every time :)

zat via AccessMonster.com said:
Thanks for your help Kluauu; this forum is a true lifesaver! I finally
figured out my problem; I was not consistent in naming my POC field: some
were ingPOC and some were strPOC - duh!
What error are you getting?
Okay, to tackle the first issue: The control source for POC now has the
field POC. I have an event procedure on Org for After Update that reads: Me.
[quoted text clipped - 26 lines]
in the Control Source of the Status field. So since this isn't updating my
tables, what is the correct way of accomplishing these tasks? Thanks so much!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top