G
GregJG
I have a form with a combobox (cboCust).
If "add a new" (which is in the list of cboCust) is selected, or if th
text typed into cbocust is not located in the list of cbocust, I wan
it to automatically open up another form (newcustfrm). the newcustfr
needs to open when the user leaves cbocust.
I have been using a simular vba code in worksheet_change to do it wit
a certain cell on a worksheet. but I would like to be able to do i
from a form. This is what I am using on the worksheet;
Private Sub Worksheet_Change(ByVal Target As Range)
Dim found As Range
With Target(1)
If Not Intersect(.Cells, Range("D3")) Is Nothing Then
If Not IsEmpty(.Value) Then
Application.ScreenUpdating = False
With Workbooks.Open("f:\db1.xls")
Set found = .Sheets("Cust").Columns(1).find( _
What:=Target(1).Value)
.Close True
End With
If found Is Nothing Then _
frmNewCust.Show
End If
End If
Application.ScreenUpdating = True
End With
I have been trying to code this into cboCust_change() but can't seem t
get anything going.
Can anyone help
If "add a new" (which is in the list of cboCust) is selected, or if th
text typed into cbocust is not located in the list of cbocust, I wan
it to automatically open up another form (newcustfrm). the newcustfr
needs to open when the user leaves cbocust.
I have been using a simular vba code in worksheet_change to do it wit
a certain cell on a worksheet. but I would like to be able to do i
from a form. This is what I am using on the worksheet;
Private Sub Worksheet_Change(ByVal Target As Range)
Dim found As Range
With Target(1)
If Not Intersect(.Cells, Range("D3")) Is Nothing Then
If Not IsEmpty(.Value) Then
Application.ScreenUpdating = False
With Workbooks.Open("f:\db1.xls")
Set found = .Sheets("Cust").Columns(1).find( _
What:=Target(1).Value)
.Close True
End With
If found Is Nothing Then _
frmNewCust.Show
End If
End If
Application.ScreenUpdating = True
End With
I have been trying to code this into cboCust_change() but can't seem t
get anything going.
Can anyone help