Hi programmers,
I am not a programmer but i have to use some vba code in my application.
I have a problem in selecting combo box values in reference to other fields.
My table fields are like CustomerID, CustomerName, CustomerAddress
these fields are selected in a form.When i try to select a CustomerID(Combo Box) then i
am not able to get responded CustomerName and CustomerAddress.
I have tried to use VB Code like
CustomerID_BeforeUpdate(Cancel As Interger)
Dim strMsg As String, strTitle As String
Dim intStyle As Interger
If IsNull(Me!CustomerID) or Me!CustomerID = "" Then
strMsg = "a value must be picked"
strTitle = "Diplaying Customer Information"
intStyle = vbOKOnly
MsgBox strMsg, intTitle, strTitle
Cancel = True
End If
End Sub
Private Sub CustomerID_AfterUpdate()
Me!CustomerID = Me!CustomerID.Customer
Me!CustomerName = Me!CustomerName.Customer
Me!CustomerAddress= Me!CustomerAddress.Customer
End Sub
Anyone can help me ? i will be thankfull to you guys!