AfterUpdate

  • Thread starter Thread starter nclovespunk
  • Start date Start date
N

nclovespunk

I'm trying to get some fields to auto update in a form. I have read several
threads and looked at several examples all saying to use this:

Private Sub BUNO_afterupdate()
Me.side_number = Me.BUNO / SER.Column(1)
End Sub

I'm getting a run-time error everytime I use this. What can I do? I need to
auto fill about 3 fields. Thanks for any help.
 
What is the name of the control? Do you have a control with the name BUNO /
SER? If so, try the following.

Private Sub BUNO_afterupdate()
Me.side_number = Me.[BUNO / SER].Column(1)
End Sub

Control names should never have spaces in them. And they should never have
the divisor or other arithmetic characters. What you posted would be read
as
Set Side_Number to the result of Buno divided by SER.Column(0)

Using square brackets will tell the program the BUNO / SER is the name of a
control

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Okay... I changed the name of the control to just BUNO and that worked for
the side_number. How do I get it to populate the other fields?

Private Sub BUNO_afterupdate()
Me.SIDE_NUMBER = Me.[BUNO].Column(1)
Me.TEC = Me.BUNO
End Sub

I tried this and that didn't work. Thanks for your help.

Tyler

John said:
What is the name of the control? Do you have a control with the name BUNO /
SER? If so, try the following.

Private Sub BUNO_afterupdate()
Me.side_number = Me.[BUNO / SER].Column(1)
End Sub

Control names should never have spaces in them. And they should never have
the divisor or other arithmetic characters. What you posted would be read
as
Set Side_Number to the result of Buno divided by SER.Column(0)

Using square brackets will tell the program the BUNO / SER is the name of a
control
I'm trying to get some fields to auto update in a form. I have read
several
[quoted text clipped - 7 lines]
to
auto fill about 3 fields. Thanks for any help.
 
Me.Tec = Me.Buno.Column(0) 'First column is column 0
Me.SomeThing = Me.Buno.Column(2) 'Third column is column 2

Columns are numbered from zero to N, where N is one less than the count
of columns.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

Okay... I changed the name of the control to just BUNO and that worked for
the side_number. How do I get it to populate the other fields?

Private Sub BUNO_afterupdate()
Me.SIDE_NUMBER = Me.[BUNO].Column(1)
Me.TEC = Me.BUNO
End Sub

I tried this and that didn't work. Thanks for your help.

Tyler

John said:
What is the name of the control? Do you have a control with the name BUNO /
SER? If so, try the following.

Private Sub BUNO_afterupdate()
Me.side_number = Me.[BUNO / SER].Column(1)
End Sub

Control names should never have spaces in them. And they should never have
the divisor or other arithmetic characters. What you posted would be read
as
Set Side_Number to the result of Buno divided by SER.Column(0)

Using square brackets will tell the program the BUNO / SER is the name of a
control
I'm trying to get some fields to auto update in a form. I have read
several
[quoted text clipped - 7 lines]
to
auto fill about 3 fields. Thanks for any help.
 
Thanks I'll give that a try. Have a great day.

John said:
Me.Tec = Me.Buno.Column(0) 'First column is column 0
Me.SomeThing = Me.Buno.Column(2) 'Third column is column 2

Columns are numbered from zero to N, where N is one less than the count
of columns.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
Okay... I changed the name of the control to just BUNO and that worked for
the side_number. How do I get it to populate the other fields?
[quoted text clipped - 28 lines]
 
Back
Top