Hi All,
I have a list box on one of my forms that looks up customer names. It is linked to tblCustomer. It did work before but I am thinking that I have messed up the VB somehow when you click on it now nothing happens where before it would have brought the customer details into the form. UPDATE** And my exit form button has stopped working Arrrrgh here is the whole of the VB code
Code:
Option Compare Database
Private Sub lstCustomer_AfterUpdate()
Me.Filter = ""
Me.FilterOn = False
Me.Filter = "CustomerID=" & Forms!frmCustomer!lstCustomer
Me.FilterOn = True
End Sub
Private Sub Postcode_AfterUpdate()
Me.Refresh
End Sub
'------------------------------------------------------------
' cmdAddRecord_Click
'
'------------------------------------------------------------
Private Sub cmdAddRecord_Click()
On Error GoTo cmdAddRecord_Click_Err
On Error Resume Next
DoCmd.GoToRecord , "", acNewRec
If (MacroError <> 0) Then
Beep
MsgBox MacroError.Description, vbOKOnly, ""
End If
cmdAddRecord_Click_Exit:
Exit Sub
cmdAddRecord_Click_Err:
MsgBox Error$
Resume cmdAddRecord_Click_Exit
End Sub
'------------------------------------------------------------
' cmdExitForm_Click
'
'------------------------------------------------------------
Private Sub cmdExitForm_Click()
On Error GoTo cmdExitForm_Click_Err
DoCmd.Close , ""
cmdExitForm_Click_Exit:
Exit Sub
cmdExitForm_Click_Err:
MsgBox Error$
Resume cmdExitForm_Click_Exit
End Sub
Not sure if I need to provide more info?? Would be grateful for any help!!
Thanks