As orange is suggesting, this makes no sense! Your code that he included
Code:
Me.SrchMed_ID.SetFocus
MedID = Me.SrchMed_ID.Text
tells us that SrchMed_ID is a Control on your Form. But with this
Dim SrchMed_ID As String
you're telling us that SrchMed_ID is a Variable! It can't be both!
Then you do something similar with Medicaid_ID; you use it as a Field, in the DLookup:
If IsNull(DLookup("[Medicaid_ID]", "Returned_Mail", "Medicaid_ID = '" & SrchMed_ID & "'")) Then
but you declare it, too, as a Variable, with
Dim Medicaid_ID As String
and it simply can't be both. As orange said, you really need to strip it (of sensitive data) and zip it, and post it here for us to look at.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007