Kamis, 13 Oktober 2011

[MS_AccessPros] Re: Type mismatch that I can't figure out

 

Guess my modus operandi is if there's a problem add parens :-)

--- In MS_Access_Professionals@yahoogroups.com, "Bill Mosca" <wrmosca@...> wrote:
>
> You're welcome, Connie. I've noticed a few places where you added parens that aren't necessary, but better over-kill than ommission.
>
> Bill
>
> --- In MS_Access_Professionals@yahoogroups.com, mrsgoudge <no_reply@> wrote:
> >
> > Bill and John,
> >
> > Thank you! I don't know what got into me. I must have gotten bit by the bug parentheitis. Your responses helped me to understand the use of quotes etc. Hopefully it will stick in my brain ;-)
> >
> > Connie
> >
> > --- In MS_Access_Professionals@yahoogroups.com, mrsgoudge <no_reply@> wrote:
> > >
> > > Good morning/whatever it is where you are!
> > >
> > > I'm getting Type mismatch error.
> > >
> > > The code:
> > > -HomeInfo form
> > > -ParcelNbr textbox
> > > -AfterUpdate event
> > > -Goal of the code is to check to see if there's another entry in the HomeInfo table with the same County and ParcelNbr and if so give a message saying that this property is already in the database.
> > >
> > > ParcelNbr is text field
> > > ContactID is a long integer in both the HomeInfo table and the County_List table.
> > >
> > > When I hover Me.ParcelNbr = "12-0045-000" and Me.CountyID.Column(0) = "1" If I change it to Me.CountyID then when I hover Me.CountyID = 1. Either way I get the message.
> > >
> > > Many thanks!
> > > Connie
> > >
> > > 'If ParcelNbr in the same County exists in the HomeInfo table
> > > If Not IsNull(DLookup("ParcelNbr", "HomeInfo", ("ParcelNbr = """ & Me.ParcelNbr & """") And ("CountyID = " & Me.CountyID.Column(0)))) Then
> > > MsgBox "This Parcel Nbr is already in the database." & vbNewLine & _
> > > "Use Ctrl F to find the property."
> > > Me.Undo
> > > DoCmd.GoToControl "ParcelNbr"
> > > End If
> > >
> >
>

__._,_.___
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