Thanks Stuart, that worked fine for me. It's exactly how I wanted to work.
> "Julia82" <(E-Mail Removed)> wrote in message
> news:3236E5E1-70FC-4D45-B185-(E-Mail Removed)...
> >I have a textbox that changes. Inside are names.
> >
> > I want where the name in my query matches the name in that textbox,
> > another
> > texbox displays me the count of duplicates for that user.
> >
> > I don't know how to get the values from the query and put them on my form
> >
> > Thanks!
> >
> > "(E-Mail Removed)" wrote:
> >
> >> On Feb 2, 3:38 pm, Julia82 <Juli...@discussions.microsoft.com> wrote:
> >> > Hi,
> >> >
> >> > How can I count same rows in a table? ex.
> >> >
> >> > ID NAME
> >> > 1 MARY
> >> > 2 JOHN
> >> > 3 MARY
> >> > 4 MARY
> >> > 5 JOHN
> >> >
> >> > I want to know how many JOHN there are?
> >> >
> >> > Thanks!
> >>
> >> use a totals query
> >>
> >> SELECT Name, Count(*)
> >> FROM tblNames
> >> ORDER BY Name
> >> GROUP BY Name
>
> First off, if you're actually using "Name" as a field name then don't. It's
> a reserved word in Access and will give you trouble sooner or later. Make it
> 'UserName' for example.
>
> I would use the Dcount function to obtain the number of dupes:
>
> OtherTextbox = Dcount("UserName", "tblNames", "UserName = '" & MyTextbox &
> "'")
>
>
> .
>
|