G
gmazza via AccessMonster.com
Hey there,
I am trying to determine if a value from a field in a recordset exists in
another table but I am not sure how to code it.
I open a recordset and when I hit the correct field, I check if it is null,
if not then I want to see if the value of the field exists in another table.
Here is part of my code:
Set rs = CurrentDb.OpenRecordset("Select * from 455Export")
If rs.RecordCount > 0 Then
rs.MoveFirst
Do While Not rs.EOF
For Each fld In rs.Fields
If fld.Name = "FundCode" Then
If IsNull(fld.Value) Then
Else
If fld.Value in (Select Code from TaxArea) then
End If
End If
I know this line is wrong but I need something like it:
If fld.Value in (Select Code from TaxArea) then
Any help is appreciated, thanks!
I am trying to determine if a value from a field in a recordset exists in
another table but I am not sure how to code it.
I open a recordset and when I hit the correct field, I check if it is null,
if not then I want to see if the value of the field exists in another table.
Here is part of my code:
Set rs = CurrentDb.OpenRecordset("Select * from 455Export")
If rs.RecordCount > 0 Then
rs.MoveFirst
Do While Not rs.EOF
For Each fld In rs.Fields
If fld.Name = "FundCode" Then
If IsNull(fld.Value) Then
Else
If fld.Value in (Select Code from TaxArea) then
End If
End If
I know this line is wrong but I need something like it:
If fld.Value in (Select Code from TaxArea) then
Any help is appreciated, thanks!