When I select my combo box and either type of select a branch all of the
address information will come up but not the name of the branch which is what
the combo box is. It does the same things for my vehicles. Can someone please
help. Here is the VBA Code:
This is just an example:
Private Sub Vehicle_Unit_No_BeforeUpdate(Cancel As Integer)
Me.Vehicle_VIN = Me.Vehicle_Unit_No.Column(1)
Me.Vehicle_Year = Me.Vehicle_Unit_No.Column(2)
Me.Vehicle_Make = Me.Vehicle_Unit_No.Column(3)
Me.Vehicle_Model = Me.Vehicle_Unit_No.Column(4)
Douglas J. Steele - 26 Jul 2007 16:25 GMT
Try using the AfterUpdate event instead.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> When I select my combo box and either type of select a branch all of the
> address information will come up but not the name of the branch which is
[quoted text clipped - 9 lines]
> Me.Vehicle_Make = Me.Vehicle_Unit_No.Column(3)
> Me.Vehicle_Model = Me.Vehicle_Unit_No.Column(4)
Need Help - 26 Jul 2007 16:52 GMT
I tried that it still does not work I get an error message.
> When I select my combo box and either type of select a branch all of the
> address information will come up but not the name of the branch which is what
[quoted text clipped - 7 lines]
> Me.Vehicle_Make = Me.Vehicle_Unit_No.Column(3)
> Me.Vehicle_Model = Me.Vehicle_Unit_No.Column(4)
Douglas J. Steele - 26 Jul 2007 17:19 GMT
What's the error message you get?

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I tried that it still does not work I get an error message.
>
[quoted text clipped - 11 lines]
>> Me.Vehicle_Make = Me.Vehicle_Unit_No.Column(3)
>> Me.Vehicle_Model = Me.Vehicle_Unit_No.Column(4)
Need Help - 26 Jul 2007 17:28 GMT
The error message says:
The expression AfterUpdate you entered as the ecent property setting
produced the following error: Procedure decalration does not match
description of event or procedure having the same name
> When I select my combo box and either type of select a branch all of the
> address information will come up but not the name of the branch which is what
[quoted text clipped - 7 lines]
> Me.Vehicle_Make = Me.Vehicle_Unit_No.Column(3)
> Me.Vehicle_Model = Me.Vehicle_Unit_No.Column(4)
Douglas J. Steele - 26 Jul 2007 22:20 GMT
Sounds as though you simply changed the first line to
Private Sub Vehicle_Unit_No_AfterUpdate(Cancel As Integer)
The AfterUpdate event has no parameters:
Private Sub Vehicle_Unit_No_AfterUpdate()

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> The error message says:
>
[quoted text clipped - 15 lines]
>> Me.Vehicle_Make = Me.Vehicle_Unit_No.Column(3)
>> Me.Vehicle_Model = Me.Vehicle_Unit_No.Column(4)
Need Help - 27 Jul 2007 13:30 GMT
So what exactly does that mean? Do I have to type the Me. codes over again?
> Sounds as though you simply changed the first line to
>
[quoted text clipped - 23 lines]
> >> Me.Vehicle_Make = Me.Vehicle_Unit_No.Column(3)
> >> Me.Vehicle_Model = Me.Vehicle_Unit_No.Column(4)
Douglas J. Steele - 27 Jul 2007 14:02 GMT
You need
Private Sub Vehicle_Unit_No_AfterUpdate()
Me.Vehicle_VIN = Me.Vehicle_Unit_No.Column(1)
Me.Vehicle_Year = Me.Vehicle_Unit_No.Column(2)
Me.Vehicle_Make = Me.Vehicle_Unit_No.Column(3)
Me.Vehicle_Model = Me.Vehicle_Unit_No.Column(4)
End Sub
The simplest way is simply to select the Vehicle_Unit_No control in the
left-hand combo box within the VB Editor, and the AfterUpdate event from the
right-hand combo box. That will create the empty skeleton for you:
Private Sub Vehicle_Unit_No_AfterUpdate()
End Sub
You can then cut the code from the old event and paste it into the new
event.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> So what exactly does that mean? Do I have to type the Me. codes over
> again?
[quoted text clipped - 28 lines]
>> >> Me.Vehicle_Make = Me.Vehicle_Unit_No.Column(3)
>> >> Me.Vehicle_Model = Me.Vehicle_Unit_No.Column(4)
Need Help - 27 Jul 2007 14:54 GMT
Still does not work.
> When I select my combo box and either type of select a branch all of the
> address information will come up but not the name of the branch which is what
[quoted text clipped - 7 lines]
> Me.Vehicle_Make = Me.Vehicle_Unit_No.Column(3)
> Me.Vehicle_Model = Me.Vehicle_Unit_No.Column(4)