G
Guest
In some code I'm working on I need to do a frequent check on a string so I
send it to a function to do the check.
However, what I'm checking is refering to the contact item I have open, but
in the seperate function it doesn't recognize that. How should I be doing
what I'm trying to do:
Dim rs1 As DAO.Recordset
Set rs1 = CurrentDb.OpenRecordset("Name")
....
MyString=CheckPhone(rs1!Phone)
....
end sub
Function CheckPhone(strPhone as String) as String
....
....here I try to access something like rs1!Name but it doesn't recognize it.
Is there a way to make this stuff global or something?
....
end Function
send it to a function to do the check.
However, what I'm checking is refering to the contact item I have open, but
in the seperate function it doesn't recognize that. How should I be doing
what I'm trying to do:
Dim rs1 As DAO.Recordset
Set rs1 = CurrentDb.OpenRecordset("Name")
....
MyString=CheckPhone(rs1!Phone)
....
end sub
Function CheckPhone(strPhone as String) as String
....
....here I try to access something like rs1!Name but it doesn't recognize it.
Is there a way to make this stuff global or something?
....
end Function