Senin, 10 Oktober 2011

[MS_AccessPros] Data type mismatch error

 

I am getting data type mismatch error. Debugging indicates this line:

If Not IsNull(DLookup("ParcelNbr", "HomeInfo", ("ParcelNbr = Form.[ParcelNbr]") And ("County = " & (DLookup("CountyID", "County_List", "County = " & Me.County))))) Then

The code is in the AfterUpdate of the ParcelNbr textbox of the HomeInfo form. I want a message if there is another record with the same ParcelNbr and County. I get the message when I add the following criteria into the statement--already included above.

("County = " & (DLookup("CountyID", "County_List", "County = " & Me.County))).

The whole line is:

It is confusing:
The first "County = " refers to a long integer in the HomeInfo table. CountyID in the last DLookup statement is a long integer, "County = " near the end is text because it's referring to Me.County which is a combobox where column 0 is the CountyID (long integer) and the column 1 (visible column) is text.

Hope I'm being clear.

Thanks!
Connie

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar