Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DlookUp problem 1

Status
Not open for further replies.

Binnit

Technical User
Apr 28, 2004
627
US
The following is triggered by an afterupdate event on
Me.txtWIDNo

I am getting a Data type mismatch error when this runs and I'm not sure why.


Code:
Dim ReturnedDate As Date

ReturnedDate = DLookup("[WIDreturneddate]", "[tblwids]", "[WIDno1] = '" & Me.txtWIDNo & "'")


[WIDreturneddate] is a date field
[WIDno1] is a Long int number field
Me.txtWIDNo is a text box on my form

Any pointers where I'm going wrong?

Happiness is...not getting what you want but wanting what you have already got
 
Dim ReturnedDate As Date

ReturnedDate = DLookup("[WIDreturneddate]", "[tblwids]", "[WIDno1] = " & Me.txtWIDNo )
 
orna
Thanks a bundle thats cleared it up, simple when you know how!



Happiness is...not getting what you want but wanting what you have already got
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top