Re: Type Mismatch in dLookup
- From: Doctor <Doctor@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 25 Nov 2008 10:47:02 -0800
Thanks for the tip about the strings. Yes they did need to all be strings.
As far as strContact, I believe that you posted exactly what I already have
in my string. Perhaps you copied and pasted without making the changes? I've
done that before.
"Linq Adams via AccessMonster.com" wrote:
These things are always a hairball for me, getting the quotes correct, so I.
keep a template to use. Try this:
strContact = DLookup("ContactID", "qryLLCAddressFillIn", "[ChurchID]=" &
Me.ContactChurch.Value And """[ContactLastName]=""" & """
Me.ContactLastName.Value """)
Also, be aware that in the statement
Dim strAddress1, strAddress2, strCity, strStateID, strState, strZip,
strPhone As String
only
strPhone
is being Dimmed as a String. Every other variable is being dimmed as Variant,
which is the default. To have them all declared as String you need to use
Dim strAddress1 As String, strAddress2 As String, strCity As String,
strStateID As String, strState As String, strZip As String, strPhone As
String
--
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000/2003
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1
- References:
- Type Mismatch in dLookup
- From: Doctor
- Re: Type Mismatch in dLookup
- From: Jeff Boyce
- Re: Type Mismatch in dLookup
- From: Doctor
- Re: Type Mismatch in dLookup
- From: Jeff Boyce
- Re: Type Mismatch in dLookup
- From: Linq Adams via AccessMonster.com
- Type Mismatch in dLookup
- Prev by Date: Re: Type Mismatch in dLookup
- Next by Date: RE: steve lebans conditional formatting
- Previous by thread: Re: Type Mismatch in dLookup
- Next by thread: Re: Type Mismatch in dLookup
- Index(es):
Relevant Pages
|