G
GregJG
WB,Sh1, C5 has this formula
=IF(C5>0,VLOOKUP(C4,'F:\[database.xls]sheet1'!$A$1:$K$291,8,FALSE),0)
in VBA I have this code, if C4 is not found
With Target(1)
If Not Intersect(.Cells, Range("C4")) Is Nothing Then
If Not IsEmpty(.Value) Then
Application.ScreenUpdating = False
With Workbooks.Open("f:\database.xls")
Set found = .Sheets("1").Columns(1).find( _
What:=Target(1).Value)
.Close True
End With
If found Is Nothing Then _
frmNewData.Show
End If
End If
End With
The problem is this..... When there is a typo in C4, the form opens t
add new data. the form doesn't show what the user typed in C4, so th
user retypes and adds. Now I end up with two rows identical in th
database.xls.
Is there a way to have what was typed in C4 show on the form, o
perhaps have the form do a Vlookup before adding to the next availabl
row and letting the user know it already exists. The problem I see wit
a vlookup on the form is typos.
There are other problems I am having with this setup, but will addres
them seperate.
Thanks!! in advance :-
=IF(C5>0,VLOOKUP(C4,'F:\[database.xls]sheet1'!$A$1:$K$291,8,FALSE),0)
in VBA I have this code, if C4 is not found
With Target(1)
If Not Intersect(.Cells, Range("C4")) Is Nothing Then
If Not IsEmpty(.Value) Then
Application.ScreenUpdating = False
With Workbooks.Open("f:\database.xls")
Set found = .Sheets("1").Columns(1).find( _
What:=Target(1).Value)
.Close True
End With
If found Is Nothing Then _
frmNewData.Show
End If
End If
End With
The problem is this..... When there is a typo in C4, the form opens t
add new data. the form doesn't show what the user typed in C4, so th
user retypes and adds. Now I end up with two rows identical in th
database.xls.
Is there a way to have what was typed in C4 show on the form, o
perhaps have the form do a Vlookup before adding to the next availabl
row and letting the user know it already exists. The problem I see wit
a vlookup on the form is typos.
There are other problems I am having with this setup, but will addres
them seperate.
Thanks!! in advance :-