Re: Type Mismatch in dLookup
- From: Doctor <Doctor@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 25 Nov 2008 11:19:02 -0800
I made some changes and got a different error. But I think that I'm on the
right track.
New String*******************
strContact = DLookup("[ContactID]", "qryLLCAddressFillIn", "[ChurchID]=" &
Me.ContactChurch.Value & "' And [ContactLastName]='" &
Me.ContactLastName.Value & "'")
Error Message******************
Run time error 3075: Syntax error missing operator in query expression
'[ChurchID]=13230' AND [ContactLastName]='cash".
"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
- Follow-Ups:
- Re: Type Mismatch in dLookup
- From: Steve Sanford
- Re: Type Mismatch in dLookup
- 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: DCount problem
- Next by Date: Re: Combobox Question
- Previous by thread: Re: Type Mismatch in dLookup
- Next by thread: Re: Type Mismatch in dLookup
- Index(es):
Relevant Pages
|